authorizer

package
v0.0.0-...-fc5c953 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetKeyFunc

func GetKeyFunc(oidcDiscovery *OIDCDiscovery) (k keyfunc.Keyfunc, err error)

Types

type Authorizer

type Authorizer struct {
	OidcDiscovery *OIDCDiscovery
	//JWKSKeys      *JSONWebKeys
	KeyFunc  keyfunc.Keyfunc
	Audience string
}

Authorizer represents an authorizer object

func NewAuthorizer

func NewAuthorizer(oidcDiscoveryURL string) (*Authorizer, error)

func NewAuthorizerWithAudience

func NewAuthorizerWithAudience(oidcDiscoveryURL string, audience string) (*Authorizer, error)

func (*Authorizer) ParseAndVerifyToken

func (a *Authorizer) ParseAndVerifyToken(tokenString string) (jwt.MapClaims, error)

type OIDCDiscovery

type OIDCDiscovery struct {
	AuthorizationEndpoint string `json:"authorization_endpoint"`
	TokenEndpoint         string `json:"token_endpoint"`
	JWKSURI               string `json:"jwks_uri"`
	Issuer                string `json:"issuer"`
}

func Discovery

func Discovery(oidcDiscoveryURL string) (*OIDCDiscovery, error)

Jump to

Keyboard shortcuts

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