Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrClaims indicates the JWT is did not have the expected claims. ErrClaims = errors.New("the JWT did not have the expected claims") // ErrInvalidJWT indicates the JWT is invalid. ErrInvalidJWT = errors.New("the JWT is invalid") )
Functions ¶
This section is empty.
Types ¶
type JWTHandler ¶
JWTHandler is a function signature that takes in a Base64 encoded JWT and returns the auth principal from it.
func HandleJWT ¶
func HandleJWT(ctx context.Context, client *http.Client, jwksURL string, logger *zap.SugaredLogger, sleep time.Duration) (authHandler JWTHandler, err error)
HandleJWT creates a JWT auth handler via a closure.
TODO Add logging. Error is returned to user. Log error. Generic thing back to user.
Click to show internal directories.
Click to hide internal directories.