Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authenticator ¶
type Authenticator interface { // Authenticate returns information about the user if security is successful, a bool specifying // whether the authenticator ran or not and an error if one occurs Authenticate(req *web.Request) (*web.UserContext, Decision, error) }
Authenticator extracts the authenticator information from the request and returns information about the current user or an error if security was not successful
type Authorizer ¶
type Authorizer interface { // Authorize returns decision specifying whether the authorizer allowed, denied or abstained from giving access, // the access level associated with the decision and an error if one occurs Authorize(req *web.Request) (Decision, web.AccessLevel, error) }
Authorizer extracts the information from the authenticated user and returns a decision if the authorization passed
type Decision ¶
type Decision int
Decision represents a decision to allow or deny further processing or to abstain from taking a decision
type TokenData ¶
type TokenData interface { // Claims reads the claims from the token into the specified struct Claims(v interface{}) error }
TokenData represents the authentication token
type TokenVerifier ¶
type TokenVerifier interface { // Verify verifies that the token is valid and returns a token if so, otherwise returns an error Verify(ctx context.Context, token string) (TokenData, error) }
TokenVerifier attempts to verify a token and returns it or an error if the verification was not successful
Click to show internal directories.
Click to hide internal directories.