Documentation ¶
Index ¶
- Constants
- type Claims
- func (c Claims) Audience() []string
- func (c Claims) ClientID() string
- func (c Claims) DeviceID(deviceIDClaim string) string
- func (c Claims) Email() string
- func (c Claims) ExpiresAt() (time.Time, error)
- func (c Claims) ID() string
- func (c Claims) IssuedAt() (time.Time, error)
- func (c Claims) Issuer() string
- func (c Claims) Name() string
- func (c Claims) NotBefore() (time.Time, error)
- func (c Claims) Owner(ownerClaim string) string
- func (c Claims) Scope() []string
- func (c Claims) Subject() string
- func (c Claims) Valid() error
- func (c Claims) ValidTimes(now time.Time) error
- func (c Claims) ValidateOwnerClaim(ownerClaim string, userID string) error
- type KeyCache
- func (c *KeyCache) FetchKeys() error
- func (c *KeyCache) FetchKeysWithContext(ctx context.Context) error
- func (c *KeyCache) GetKey(token *jwt.Token) (interface{}, error)
- func (c *KeyCache) GetOrFetchKey(token *jwt.Token) (interface{}, error)
- func (c *KeyCache) GetOrFetchKeyWithContext(ctx context.Context, token *jwt.Token) (interface{}, error)
- func (c *KeyCache) LookupKey(token *jwt.Token) (jwk.Key, error)
- type ScopeClaims
- type Validator
Constants ¶
View Source
const ( ClaimExpiresAt = "exp" ClaimScope = "scope" ClaimAudience = "aud" ClaimID = "jti" ClaimIssuer = "iss" ClaimSubject = "sub" ClaimIssuedAt = "iat" ClaimNotBefore = "nbf" ClaimClientID = "client_id" ClaimEmail = "email" ClaimName = "n" )
View Source
const PlgdRequiredScope = "plgd:required:scope"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Claims ¶
type Claims jwt.MapClaims
func ParseToken ¶
type KeyCache ¶
type KeyCache struct {
// contains filtered or unexported fields
}
func (*KeyCache) FetchKeysWithContext ¶
func (*KeyCache) GetOrFetchKey ¶
func (*KeyCache) GetOrFetchKeyWithContext ¶
type ScopeClaims ¶
type ScopeClaims Claims
func NewRegexpScopeClaims ¶
func NewRegexpScopeClaims(scope ...*regexp.Regexp) *ScopeClaims
func NewScopeClaims ¶
func NewScopeClaims(scope ...string) *ScopeClaims
func (*ScopeClaims) Valid ¶
func (c *ScopeClaims) Valid() error
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
func NewValidator ¶
func (*Validator) ParseWithClaims ¶
Click to show internal directories.
Click to hide internal directories.