Documentation
¶
Overview ¶
Package keychain manages the validation and processing of jwt/oauth tokens
Index ¶
- Variables
- func ImportKeys(keyData []byte) error
- func ImportKeysFromURL(jwksURL string) error
- func ValidateMiddleware(requireAuth bool) negroni.Handler
- func ValidateToken(tokenString string, scopes ...[]string) (cloud.AuthToken, error)
- type AuthToken
- func (t *AuthToken) Claims() cloud.Claims
- func (t *AuthToken) ClientID() string
- func (t *AuthToken) Context(c context.Context) context.Context
- func (t *AuthToken) ExpiresAt() int64
- func (t *AuthToken) ID() string
- func (t *AuthToken) Scope() []string
- func (t *AuthToken) String() string
- func (t *AuthToken) Use() string
- func (t *AuthToken) Username() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidKey is returned when a public key is invalid ErrInvalidKey = errors.New("invalid public key") )
Functions ¶
func ImportKeys ¶ added in v1.3.0
ImportKeys import keys in the standard jwks json format
func ImportKeysFromURL ¶ added in v1.3.0
ImportKeysFromURL will fetch and import the public keys from the specified url
func ValidateMiddleware ¶ added in v1.4.7
ValidateMiddleware parses an http request and validate the bearer token and puts it in the request context
Types ¶
type AuthToken ¶ added in v1.3.2
type AuthToken struct {
// contains filtered or unexported fields
}
AuthToken is an JWT AuthToken
Click to show internal directories.
Click to hide internal directories.