Documentation ¶
Overview ¶
Package jwtauth is an authentication function to be used by the httpauth package
it has a background runner and channel plus caching for authentication request
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthCheckFunc ¶
func AuthCheckFunc(logger *zap.Logger, authChan chan *AuthRequest) httpauth.AuthProvider
AuthCheckFunc returns a authentication check function for use with `httpauth.BasicAuth()“
func AuthRunner ¶
func AuthRunner(ctx context.Context, logger *zap.Logger, verifier jwt.Verifier, authChan chan *AuthRequest)
AuthRunner is the routine that runs the authentication checking channels
Types ¶
type AuthRequest ¶
type AuthRequest struct { Token []byte ReturnChannel chan *AuthResponse }
AuthRequest is the authentication request and a return channel for the response.
type AuthResponse ¶
type AuthResponse struct { Result jwt.VerifyResult Error error }
AuthResponse is contains the response for a `AuthRequest`
Click to show internal directories.
Click to hide internal directories.