Versions in this module Expand all Collapse all v0 v0.7.0 Apr 3, 2021 v0.6.0 Feb 25, 2021 v0.5.0 Feb 21, 2021 Changes in this version + var TokenExpiredError = errors.New("token has already expired") type AccessTokenClaims + AuthorizedParties []string type JWK + X509 []string type Manager + func (m Manager) CreateRequestObject(issuer *config.URL, subject string, request RequestObjectClaims, ...) (string, error) + func (m Manager) ParseRequestObject(token string, signKey string) (RequestObjectClaims, error) + type RequestObjectClaims struct + ClientID string + LoginHint string + MaxAge int64 + Nonce string + Prompt string + RedirectURI string + ResponseType string + Scope string + State string + func (claims RequestObjectClaims) Validate(issuer string, audience *config.URL) error v0.4.0 Feb 15, 2021 Changes in this version + type AuthorizedParties []string + func (azp AuthorizedParties) Append(rp string) AuthorizedParties + func (azp AuthorizedParties) Includes(rp string) bool type Manager + func (m Manager) ParseSSOToken(token string) (SSOTokenClaims, error) + type SSOTokenClaims struct + Authorized AuthorizedParties + func (claims SSOTokenClaims) Validate(issuer *config.URL) error v0.3.0 Feb 13, 2021 v0.2.0 Feb 7, 2021 v0.1.0 Feb 4, 2021 v0.0.0 Feb 2, 2021 Changes in this version + var InvalidTokenError = fmt.Errorf("invalid token") + var NotJWEError = errors.New("not a valid JWE data") + var UnexpectedAudienceError = fmt.Errorf("unexpected audience") + var UnexpectedClientIDError = fmt.Errorf("unexpected client_id") + var UnexpectedIssuerError = fmt.Errorf("unexpected issuer") + var UnexpectedTokenTypeError = fmt.Errorf("unexpected token type") + func TokenHash(token string) string + type AccessTokenClaims struct + Scope string + func (claims AccessTokenClaims) Validate(issuer *config.URL) error + type CodeClaims struct + ClientID string + Nonce string + RedirectURI string + Scope string + func (claims CodeClaims) Validate(issuer *config.URL) error + type ExtraClaims map[string]interface + type IDTokenClaims struct + AccessTokenHash string + CodeHash string + ExtraClaims ExtraClaims + Nonce string + func (claims *IDTokenClaims) UnmarshalJSON(data []byte) error + func (claims IDTokenClaims) MarshalJSON() ([]byte, error) + func (claims IDTokenClaims) Validate(issuer *config.URL, audience string) error + type JWK struct + Algorithm string + E string + KeyID string + KeyType string + N string + Use string + type LoginTokenClaims struct + ClientID string + func (claims LoginTokenClaims) Validate(issuer *config.URL) error + type Manager struct + func GenerateManager() (Manager, error) + func NewManager(private *rsa.PrivateKey) (Manager, error) + func NewManagerFromFile(file io.Reader) (Manager, error) + func (m Manager) CreateAccessToken(issuer *config.URL, subject, scope string, authTime time.Time, ...) (string, error) + func (m Manager) CreateCode(issuer *config.URL, subject, clientID, redirectURI, scope, nonce string, ...) (string, error) + func (m Manager) CreateIDToken(issuer *config.URL, subject, audience, nonce, code, accessToken string, ...) (string, error) + func (m Manager) CreateLoginToken(issuer *config.URL, subject, clientID string, expiresIn time.Duration) (string, error) + func (m Manager) CreateRefreshToken(issuer *config.URL, subject, clientID, scope, nonce string, authTime time.Time, ...) (string, error) + func (m Manager) CreateSSOToken(issuer *config.URL, subject string, authTime time.Time, ...) (string, error) + func (m Manager) JWKs() ([]JWK, error) + func (m Manager) KeyID() uuid.UUID + func (m Manager) ParseAccessToken(token string) (AccessTokenClaims, error) + func (m Manager) ParseCode(token string) (CodeClaims, error) + func (m Manager) ParseIDToken(token string) (IDTokenClaims, error) + func (m Manager) ParseLoginToken(token string) (LoginTokenClaims, error) + func (m Manager) ParseRefreshToken(token string) (RefreshTokenClaims, error) + func (m Manager) PublicKey() *rsa.PublicKey + type OIDCClaims struct + AuthTime int64 + Type string + func (claims OIDCClaims) Validate(issuer *config.URL, audience string) error + type RefreshTokenClaims struct + ClientID string + Nonce string + Scope string + func (claims RefreshTokenClaims) Validate(issuer *config.URL) error