auth0

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAuth0JWKSInfo

func GetAuth0JWKSInfo(auth0Domain string) ([]byte, error)

func GetAuth0JWKSPublicKeyCert

func GetAuth0JWKSPublicKeyCert(jwksInfo []byte, idToken string) (cert string, err error)

func GetAuth0JWKSSet

func GetAuth0JWKSSet(jwksInfo []byte) (set jose.JSONWebKeySet, err error)

func ParseAuth0RSAPublicKeyFromCert

func ParseAuth0RSAPublicKeyFromCert(cert string) (*rsa.PublicKey, error)

func ValidateAuth0RS256IDToken

func ValidateAuth0RS256IDToken(rsaPublicKey *rsa.PublicKey, idToken string) error

func ValidateAuth0RS256IDTokenByJWKSSet

func ValidateAuth0RS256IDTokenByJWKSSet(set jose.JSONWebKeySet, idToken string) error

func VerifyAuth0RS256IDToken

func VerifyAuth0RS256IDToken(rsaPublicKey *rsa.PublicKey, idToken string, claims jwtTool.IJWTClaims) error

func VerifyAuth0RS256IDTokenByJWKSSet

func VerifyAuth0RS256IDTokenByJWKSSet(set jose.JSONWebKeySet, idToken string, claims jwtTool.IJWTClaims) error

Types

type Common

type Common struct {
	AuthTime        *jwt.NumericDate `json:"auth_time,omitempty"`
	Email           string           `json:"email,omitempty"`
	Name            string           `json:"name,omitempty"`
	Nickname        string           `json:"nickname,omitempty"`
	Nonce           string           `json:"nonce,omitempty"`
	Picture         string           `json:"picture,omitempty"`
	SID             string           `json:"sid,omitempty"`
	UpdatedAt       string           `json:"updated_at,omitempty"`
	UserPermissions []string         `json:"user_permissions,omitempty"`
	*jwt.Claims
}

func NewCommon

func NewCommon(claims *jwt.Claims) *Common

NewCommon method

func (*Common) ExpiresAfter

func (c *Common) ExpiresAfter(d time.Duration)

func (*Common) GetExpiresAfter

func (c *Common) GetExpiresAfter() *jwt.NumericDate

Jump to

Keyboard shortcuts

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