package
1.0.1
Repository: https://github.com/qiangxue/go-rest-api.git
Documentation: pkg.go.dev

# Functions

CurrentUser returns the user identity from the given context.
Handler returns a JWT-based authentication middleware.
MockAuthHandler creates a mock authentication middleware for testing purpose.
MockAuthHeader returns an HTTP header that can pass the authentication check by MockAuthHandler.
NewService creates a new authentication service.
RegisterHandlers registers handlers for different HTTP requests.
WithUser returns a context that contains the user identity from the given JWT.

# Interfaces

Identity represents an authenticated user identity.
Service encapsulates the authentication logic.