Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var HasRealmRole = func(role string) ClaimHandler { return func(claims Claims) error { for _, roleInToken := range claims.RealmAccess.Roles { if role == roleInToken { return nil } } return fmt.Errorf("Role %s not given", role) } }
View Source
var NoClaimHandler = func(claims Claims) error { return nil }
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth struct {
// contains filtered or unexported fields
}
func (*Auth) HandleSecure ¶
func (auth *Auth) HandleSecure(next httprouter.Handle, claimHandler ClaimHandler) httprouter.Handle
type ClaimHandler ¶
type Option ¶
type Option func(auth *Auth)
Option represents an option for the api
func JwkCacheMaxKeyAge ¶
func JwkDownloaderTimeout ¶
func JwtSignatureAlgorithm ¶
func JwtSignatureAlgorithm(alg jose.SignatureAlgorithm) Option
func WithLogger ¶
WithLogger adds a configured Logger to the auth
Click to show internal directories.
Click to hide internal directories.