Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessToken ¶
type AccessToken interface { // Default access token properties ClientID() (string, bool) Exp() (int64, bool) Iat() (int64, bool) Iss() (string, bool) Jti() (string, bool) Scope() (string, bool) Sub() (string, bool) // Common convenience properties: Aud() (interface{}, bool) Nbf() (int64, bool) Typ() (string, bool) // Other convenience methods: RawClaims() Claims }
AccessToken represents an access token.
func DefaultAccessToken ¶
func DefaultAccessToken(claims Claims) AccessToken
DefaultAccessToken returns an instacne of the access token. Call this function using claims returned from jwks.Validator.ValidateToken(string).
type IDToken ¶
type IDToken interface { // https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims Birthdate() (string, bool) Email() (string, bool) EmailVerified() (bool, bool) FamilyName() (string, bool) Gender() (string, bool) MiddleName() (string, bool) Name() (string, bool) Nickname() (string, bool) PhoneNumber() (string, bool) PhoneNumberVerified() (bool, bool) Picture() (string, bool) PreferredUsername() (string, bool) Profile() (string, bool) Sub() (string, bool) UpdatedAt() (int64, bool) Website() (string, bool) ZoneInfo() (string, bool) // Other convenient documented claims: // https://openid.net/specs/openid-connect-core-1_0.html#AddressClaim Address() (interface{}, bool) // https://openid.net/specs/openid-connect-core-1_0.html#CodeIDToken AtHash() (string, bool) // https://openid.net/specs/openid-connect-core-1_0.html#HybridIDToken CHash() (string, bool) // https://openid.net/specs/openid-connect-core-1_0.html#SelfIssuedValidation SubJWK() (interface{}, bool) }
IDToken represents the ID token.
func DefaultIDToken ¶
DefaultIDToken returns an instacne of the ID token. Call this function using claims returned from jwks.Validator.ValidateToken(string).
type JWT ¶
type JWT interface { AccessToken() string IDToken() string ExpiresIn() int64 RefreshExpiresIn() int64 RefreshToken() string TokenType() string NotBeforePolicy() int64 SessionState() string Scope() string }
JWT is a JWT
func DefaultJWT ¶
DefaultJWT tries to parse a JWT from bytes using the default implementation.
type RefreshToken ¶
type RefreshToken interface { // Default refresh token properties Azp() (string, bool) Exp() (int64, bool) Iat() (int64, bool) Iss() (string, bool) Jti() (string, bool) Scope() (string, bool) Sub() (string, bool) // Common convenience properties: Aud() (interface{}, bool) Nbf() (int64, bool) Typ() (string, bool) // Other convenience methods: RawClaims() Claims }
RefreshToken represents a refresh token.
func DefaultRefreshToken ¶
func DefaultRefreshToken(claims Claims) RefreshToken
DefaultRefreshToken returns an instacne of the refresh token. Call this function using claims returned from jwks.Validator.ValidateToken(string).