Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNoAuthData that is returned if the authorizer doesn't find any data in the request that can be used for auth. ErrNoAuthData = errors.New("the request doesn't contain any auth data that can be used by the Authorizer") )
View Source
var WireSet = wire.NewSet( ProvideAuthenticator, )
WireSet provides a wire set for this package.
Functions ¶
This section is empty.
Types ¶
type Authenticator ¶
type Authenticator interface { /* * Tries to authenticate the acting principal if credentials are available. * Returns: * (session, nil) - request contains auth data and principal was verified * (nil, ErrNoAuthData) - request doesn't contain any auth data * (nil, err) - request contains auth data but verification failed */ Authenticate(r *http.Request) (*auth.Session, error) }
Authenticator is an abstraction of an entity that's responsible for authenticating principals that are making calls via HTTP.
func ProvideAuthenticator ¶
func ProvideAuthenticator( config *types.Config, principalStore store.PrincipalStore, tokenStore store.TokenStore, ) Authenticator
type JWTAuthenticator ¶
type JWTAuthenticator struct {
// contains filtered or unexported fields
}
JWTAuthenticator uses the provided JWT to authenticate the caller.
func NewTokenAuthenticator ¶
func NewTokenAuthenticator( principalStore store.PrincipalStore, tokenStore store.TokenStore, cookieName string, ) *JWTAuthenticator
func (*JWTAuthenticator) Authenticate ¶
Click to show internal directories.
Click to hide internal directories.