Documentation ¶
Overview ¶
Package handlers contains handlers for the JWT Mock server.
Index ¶
Constants ¶
const JWKSDefaultPath = "/.well-known/jwks.json"
JWKSDefaultPath is the default path for JWKS handlers.
const JWTDefaultPath = "/generate-jwt"
JWTDefaultPath is the default path for JWT handlers.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type JWKSHandler ¶
type JWKSHandler struct {
// contains filtered or unexported fields
}
JWKSHandler provides handlers for JWKS operations and stores state of the current JWKS.
func NewJWKSHandler ¶
func NewJWKSHandler(keyStore keyStore, logger *log.Logger) *JWKSHandler
NewJWKSHandler is the preferred way to create a JWKSHandler instance.
func (*JWKSHandler) Get ¶
func (j *JWKSHandler) Get(w http.ResponseWriter, _ *http.Request)
Get returns a JSON web key set for the authorization server.
func (*JWKSHandler) Post ¶
func (j *JWKSHandler) Post(w http.ResponseWriter, _ *http.Request)
Post forces a new JSON web key set to be created / the key set to be refreshed.
func (*JWKSHandler) RegisterDefaultPaths ¶
func (j *JWKSHandler) RegisterDefaultPaths(api *http.ServeMux)
RegisterDefaultPaths registers the default paths for JWKS operations.
type JWTHandler ¶
type JWTHandler struct {
// contains filtered or unexported fields
}
JWTHandler provides handlers for working with JWTs
func NewJWTHandler ¶
func NewJWTHandler(keyStore keyStore, logger *log.Logger) *JWTHandler
NewJWTHandler is the preferred way to create a JWTHandler instance.
func (*JWTHandler) Post ¶
func (j *JWTHandler) Post(w http.ResponseWriter, r *http.Request)
Post creates a signed JWT with the provided claims.
func (*JWTHandler) RegisterDefaultPaths ¶
func (j *JWTHandler) RegisterDefaultPaths(api *http.ServeMux)
RegisterDefaultPaths registers the default paths for JWKS operations.