package
Version:
v0.0.0-...-383e6fc
Opens a new window with list of versions in this module.
Published: Mar 19, 2020
License: AGPL-3.0
Opens a new window with license information.
Imports: 14
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package auth is the responsible of user authentication
and authorization.
Init checks whether the tokens secret is set and secure or not. It also creates the admin user if it doesn't exist
Token is a JWT token
LoginLocal authenticates the user against the DB
NewToken issues a new token
Renew renews the validity of the token
String returns the token as a string
Validate checks whether a token is valid or not
ValidateAgent checks whether an agent token (secret) is valid or not
type TokenClaims struct {
Usr string
FirstIssued time.Time
jwt.StandardClaims
}
TokenClaims are going to be embedded inside the JWT Token
Source Files
¶
Directories
¶
Package types has all the different authentication types
|
Package types has all the different authentication types |
Click to show internal directories.
Click to hide internal directories.