Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authenticator ¶
type Authenticator interface {
Verify(token string, claims jwt.Claims) error
Sign(token *jwt.Token) (string, error)
}
func NewSecretAuthenticator ¶
func NewSecretAuthenticator(secret []byte) Authenticator
type Claims ¶
type Claims struct {
jwt.StandardClaims
Identity identity.Identity `json:"identity"`
}
type ClaimsProvider ¶
func NewClaimsProvider ¶
func NewClaimsProvider(authenticator Authenticator) ClaimsProvider
type TokenAuthorizer ¶
func NewJWTTokenAuthorizer ¶
func NewJWTTokenAuthorizer(claimsProvider ClaimsProvider) TokenAuthorizer
Click to show internal directories.
Click to hide internal directories.