Documentation
¶
Overview ¶
Package tokens manages token authentication
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type JWTAuthenticator ¶ added in v0.5.18
type JWTAuthenticator struct {
Client JWTAuthenticatorClient
}
JWTAuthenticator authenticates requests possessing a header with a JWT token (i.e. API requests).
func (*JWTAuthenticator) Authenticate ¶ added in v0.5.18
func (a *JWTAuthenticator) Authenticate(w http.ResponseWriter, r *http.Request) (authz.Subject, error)
type JWTAuthenticatorClient ¶ added in v0.5.18
type Service ¶ added in v0.2.2
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (Service) GetSubject ¶ added in v0.2.2
GetSubject retrieves the subject from a JWT.
func (Service) RegisterKind ¶ added in v0.2.2
func (r Service) RegisterKind(k resource.Kind, fn SubjectGetter)
RegisterKind registers a kind of authentication token, providing a func that can retrieve the OTF subject indicated in the token.
type SubjectGetter ¶ added in v0.2.0
SubjectGetter retrieves an OTF subject given the jwtSubject string, which is the value of the 'subject' field parsed from a JWT.
type TokensService ¶
type TokensService = Service
Alias service to permit embedding it with other services in a struct without a name clash.
Click to show internal directories.
Click to hide internal directories.