Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitiateModule ¶
InitiateModule initializes the JWT middleware with the provided scope. CONFIG --> scope.token_lookup, scope.signing_key, scope.signing_method, scope.exp_in_hours
Types ¶
type Module ¶ added in v0.1.8
type Module struct {
// contains filtered or unexported fields
}
func (*Module) GenerateToken ¶ added in v0.1.8
GenerateToken generates a JWT token with the provided additional claims. It takes additionalClaims as input, which is a map of custom claims to be added to the token. SigningKey, SigningMethod, and ExpInHours are taken from the config keys scope.signing_key, scope.signing_method, and scope.exp_in_hours respectively. The function returns a pointer to the generated token string and an error, if any.
func (*Module) Middleware ¶ added in v0.1.8
func (m *Module) Middleware() echo.MiddlewareFunc
Middleware returns the echo.MiddlewareFunc for JWT authentication.
func (*Module) PrintDebugLogs ¶ added in v0.1.8
func (m *Module) PrintDebugLogs()
Click to show internal directories.
Click to hide internal directories.