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 ClaimsProvider ¶
func NewClaimsProvider ¶
func NewClaimsProvider(authenticator Authenticator) ClaimsProvider
type TokenAuthorizer ¶
type TokenAuthorizer interface {
Auth(ctx context.Context, token string) (*identity.Identity, error)
}
func NewJWTTokenAuthorizer ¶
func NewJWTTokenAuthorizer(authClient proto.AuthenticationServiceClient, claimsProvider ClaimsProvider, authenticator Authenticator) TokenAuthorizer
Click to show internal directories.
Click to hide internal directories.