Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func RequireActiveBearerSession ¶
func RequireActiveBearerSession(validator SessionValidator) func(http.Handler) http.Handler
Types ¶
type AccessTokenClaims ¶
type Authenticator ¶
type Authenticator struct {
// contains filtered or unexported fields
}
func NewAuthenticator ¶
func NewAuthenticator(cfg config.Config) *Authenticator
func (*Authenticator) AuthenticateRequest ¶
func (a *Authenticator) AuthenticateRequest(r *http.Request) (*Principal, error)
func (*Authenticator) OptionalPrincipalMiddleware ¶
func (a *Authenticator) OptionalPrincipalMiddleware() func(http.Handler) http.Handler
type Authorizer ¶
type Authorizer struct {
// contains filtered or unexported fields
}
func NewAuthorizer ¶
func NewAuthorizer(cfg config.Config) *Authorizer
func (*Authorizer) IsAdmin ¶
func (a *Authorizer) IsAdmin(principal *Principal) bool
func (*Authorizer) RequireAdmin ¶
func (a *Authorizer) RequireAdmin() func(http.Handler) http.Handler
func (*Authorizer) RequireAuthenticated ¶
func (a *Authorizer) RequireAuthenticated() func(http.Handler) http.Handler
type Principal ¶
type PrincipalSource ¶
type PrincipalSource string
const ( PrincipalSourceForwardAuth PrincipalSource = "forward_auth" PrincipalSourceBearerJWT PrincipalSource = "bearer_jwt" )
Click to show internal directories.
Click to hide internal directories.