Versions in this module Expand all Collapse all v0 v0.0.5 Oct 7, 2023 Changes in this version + type AuthorizationResponse struct + AccessToken string + Error string + ErrorDescription string + ExpiresIn int + IDToken string + Scope string + TokenType string v0.0.4 Jul 31, 2023 Changes in this version type Config + KeyURI string + type OfflineValidator struct + Keys map[string]*rsa.PublicKey + func (v *OfflineValidator) Initialize(ctx context.Context) error + func (v *OfflineValidator) Validate(_ context.Context, tokenString string) error + type OktaIntrospectionResponse struct + Active bool + Aud string + ClientId string + DeviceId string + Exp int64 + Iat int64 + Iss string + Jti string + Nbf int64 + Scope string + Sub string + TokenType string + Uid string + Username string + func (i OktaIntrospectionResponse) Valid(cfg *Config) error + type OktaOnlineValidator struct + func NewOktaOnlineValidator(cfg *Config) *OktaOnlineValidator + func (o *OktaOnlineValidator) Initialize(_ context.Context) error + func (o *OktaOnlineValidator) Introspect(ctx context.Context, tokenString string) (OktaIntrospectionResponse, error) + func (o *OktaOnlineValidator) Validate(ctx context.Context, tokenString string) error + type OnlineValidator struct type Validator + func NewOfflineValidator(cfg *Config) Validator v0.0.3 Jul 17, 2023 Changes in this version type Validator + func (v *Validator) LoadKeys() error v0.0.2 Jul 5, 2023 Changes in this version + var DefaultScopes = []string + var ErrAuthPending = errors.New("authorization pending") + var ErrNotImplemented = errors.New("not implemented") + type Auth0 struct + func (a Auth0) Config(org, clientID string) *Config type Config + Audience string + Issuer string + URI string + type Key struct + Alg string + E string + Kid string + Kty string + N string + Use string + X5C []string + X5T string + type Okta struct + func (o Okta) Config(org, clientID string) *Config + type Provider interface + Config func(string, string) *Config + func NewProvider(name string) Provider + type Validator struct + Keys map[string]*rsa.PublicKey + func NewValidator(cfg *Config) Validator + func (v *Validator) Initialize() error + func (v *Validator) Validate(tokenString string) error v0.0.1 Jun 25, 2023 Changes in this version + const GrantType + var ErrAccessDenied = errors.New("access denied by user") + type Authorizer struct + func NewAuthorizer(config *Config) *Authorizer + func (a *Authorizer) Refresh(ctx context.Context) error + func (a *Authorizer) RequestCode(ctx context.Context) (Code, error) + func (a *Authorizer) Revoke(ctx context.Context) error + func (a *Authorizer) WaitForAuthorization(ctx context.Context, code Code) (oauth2.Token, error) + type Code struct + DeviceCode string + ExpiresIn int64 + Interval int64 + UserCode string + VerificationURI string + VerificationURIComplete string + type Config struct + OAuth2Config oauth2.Config + func NewConfig(providerName, org, clientID string) (*Config, error) + type Error struct + ErrorCauses []string + ErrorCode string + ErrorSummary string