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 (m *LogtoAuthMiddleware) Handle(next http.HandlerFunc) http.HandlerFunc
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
func (m *WebhookAuthMiddleware) Handle(next http.HandlerFunc) http.HandlerFunc
Click to show internal directories.
Click to hide internal directories.