authenticator

package
v0.0.0-...-25b90bb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthorizationHeaderKey = "Authorization"
	JwksKeyIDKey           = "kid"
)

Variables

This section is empty.

Functions

func PrefixScopes

func PrefixScopes(prefixes []string, callbackScope string) []string

Types

type Authenticator

type Authenticator struct {
	// contains filtered or unexported fields
}

func New

func New(jwksEndpoints []string, zoneId, subscriptionCallbacksScope string, trustedClaimPrefixes []string, allowJWTSigningNone bool) *Authenticator

func (*Authenticator) Handler

func (a *Authenticator) Handler() func(next http.Handler) http.Handler

func (*Authenticator) SetJWKSEndpoints

func (a *Authenticator) SetJWKSEndpoints(urls []string)

func (*Authenticator) SynchronizeJWKS

func (a *Authenticator) SynchronizeJWKS(ctx context.Context) error

type Claims

type Claims struct {
	Scopes []string `json:"scope"`
	ZID    string   `json:"zid"`
	jwt.StandardClaims
}

func (Claims) Valid

func (c Claims) Valid() error

type Error

type Error struct {
	Message string `json:"message"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL