Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMissingJwtToken = errors.Unauthorized(reason, "JWT token is missing") ErrWrongContext = errors.Unauthorized(reason, "Wrong context for middleware") )
Functions ¶
func Server ¶
func Server(a authn.Authenticator) middleware.Middleware
Server is a server auth middleware. Check the token and extract the info from token.
func WithSignToken ¶
func WithSignToken(a authn.Authenticator, userID string) middleware.Middleware
WithSignToken is a client jwt middleware used to sign a jwt token.
func WithToken ¶
func WithToken(token string) middleware.Middleware
WithToken is a client jwt middleware.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.