security

package
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 18, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SigningKey        []byte
	EncryptionKey     []byte
	UserSigningKey    []byte
	UserEncryptionKey []byte
	OIDCProvider      *oidc.Provider
	Oauth2Config      oauth2.Config
)
View Source
var ExpiryTime time.Duration = 5
View Source
var VerifyClientIP bool = true

Functions

func GeneratePAAToken

func GeneratePAAToken(ctx context.Context, username string, server string) (string, error)

func GenerateUserToken

func GenerateUserToken(ctx context.Context, userName string) (string, error)

func UserInfo

func UserInfo(ctx context.Context, token string) (jwt.Claims, error)

func VerifyPAAToken

func VerifyPAAToken(ctx context.Context, tokenString string) (bool, error)

func VerifyServerFunc

func VerifyServerFunc(ctx context.Context, host string) (bool, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL