Documentation ¶
Index ¶
Constants ¶
View Source
const ( MissingToken = "missing token" InvalidKid = "invalid jwt kid" InvalidSignature = "invalid jwt signature" MissingKid = "missing jwt kid" MissingCapabilities = "missing jwt capabilities" NoMatchingCapabilities = "no matching jwt capabilities" MissingClientId = "missing jwt client id" MissingTenantId = "missing tenant id" NoAllowedPartners = "no allowed partners" InvalidSATFormat = "invalid sat format" AllowedResources = "allowedResources" AllowedPartners = "allowedPartners" Capabilities = "capabilities" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultJWTConsumer ¶
func (*DefaultJWTConsumer) VerifyToken ¶
func (sc *DefaultJWTConsumer) VerifyToken(ctx context.Context, token string, api string, method string, tid *tenant.Id) ([]string, string, error)
VerifyToken validates a give token for an optional list of clientIds / "subjects" (use empty array if any client id ok) and for a given domain, component, api and method (api and method are encoded in the claim)
type JWTAuthError ¶
type JWTAuthError struct {
Wrapped error
}
func (*JWTAuthError) Error ¶
func (e *JWTAuthError) Error() string
type JWTConsumer ¶
type JWTConsumer interface {
VerifyToken(ctx context.Context, token string, api string, method string, tid *tenant.Id) ([]string, string, error)
}
func NewJWTConsumer ¶
type UnauthorizedError ¶
type UnauthorizedError struct {
}401 errors
func (*UnauthorizedError) Error ¶
func (nfe *UnauthorizedError) Error() string
Click to show internal directories.
Click to hide internal directories.