Documentation
¶
Index ¶
Constants ¶
View Source
const (
// JWKSURI is the URI for the JWKS endpoint.
JWKSURI = "/.well-known/jwks.json"
)
Variables ¶
This section is empty.
Functions ¶
func NewJWKSHandler ¶ added in v0.8.5
func NewJWKSHandler(publicKeyPEM []byte) (http.HandlerFunc, error)
NewJWKSHandler creates a new HTTP handler that serves the JWK Set for the given public key.
Types ¶
type InMemoryValidator ¶ added in v0.8.5
type InMemoryValidator struct {
// contains filtered or unexported fields
}
InMemoryValidator validates JWT tokens signed with an ECDSA public key
func NewInMemoryValidator ¶ added in v0.8.5
func NewInMemoryValidator(publicKeyPEM []byte) (*InMemoryValidator, error)
NewInMemoryValidator creates a new Validator with the public key.
func (*InMemoryValidator) Validate ¶ added in v0.8.5
func (v *InMemoryValidator) Validate(tokenStr, subject string) (jwt.Claims, error)
Validate validates the token is valid and was issued for the specified subject.
type JWTValidator ¶ added in v0.8.5
type RemoteValidator ¶ added in v0.8.5
type RemoteValidator struct {
// contains filtered or unexported fields
}
func NewRemoteValidator ¶ added in v0.8.5
func NewRemoteValidator(ctx context.Context, urls []string) (*RemoteValidator, error)
NewRemoteValidator creates a new Validator with the public key.
func (*RemoteValidator) Validate ¶ added in v0.8.5
func (v *RemoteValidator) Validate(tokenStr, subject string) (jwt.Claims, error)
Validate validates the token is valid and was issued for the specified subject.
Click to show internal directories.
Click to hide internal directories.