middleware

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTokenIssuerNotMatch            = errors.New("token issuer not match")
	ErrTokenAudienceNotMatch          = errors.New("token audience not match")
	ErrTokenExpired                   = errors.New("token expired")
	ErrTokenIssuedInTheFuture         = errors.New("token issued in the future")
	ErrTokenIssuedInThePast           = errors.New("token issued in the past")
	ErrCallbackUriNotMatchRedirectUri = errors.New("callback uri not match redirect uri")
	ErrStateNotMatch                  = errors.New("state not match")
	ErrCodeNotFoundInCallbackUri      = errors.New("code not found in callback uri")
	ErrJwksSetNotFound                = errors.New("jwks set not found")
)
View Source
var (
	LOGTO_SIGNATURE_HEADER = "logto-signature-sha-256"
	ErrSignatureMismatch   = errors.New("signature mismatch")
	ErrNoSignatureNotFound = errors.New("no signature found")
)
View Source
var ISSUED_AT_RESTRICTIONS int64 = 60 // in seconds

Functions

This section is empty.

Types

type LogtoAuthMiddleware

type LogtoAuthMiddleware struct {
	Config *config.LogtoAppConfig
	// contains filtered or unexported fields
}

func NewLogtoAuthMiddleware

func NewLogtoAuthMiddleware(c *config.LogtoAppConfig) *LogtoAuthMiddleware

func (*LogtoAuthMiddleware) CreateRemoteJwks

func (m *LogtoAuthMiddleware) CreateRemoteJwks() (*jose.JSONWebKeySet, error)

func (*LogtoAuthMiddleware) Handle

func (*LogtoAuthMiddleware) VerifyToken

func (m *LogtoAuthMiddleware) VerifyToken(token string) (*core.IdTokenClaims, error)

type WebhookAuthMiddleware added in v0.0.3

type WebhookAuthMiddleware struct {
	Config *config.LogtoWebhookConfig
}

func NewWebhookAuthMiddleware added in v0.0.3

func NewWebhookAuthMiddleware(c *config.LogtoWebhookConfig) *WebhookAuthMiddleware

func (*WebhookAuthMiddleware) Handle added in v0.0.3

Jump to

Keyboard shortcuts

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