Documentation ¶
Index ¶
- Constants
- Variables
- func Authenticate(username, password string, authEntry AuthModel) (string, error)
- func Authorize(jwtTokenString string, roleAccess int) error
- func GenerateJWT(authEntry AuthModel) (string, error)
- func Init(iter, hashLength int, timePeriod int64, issuer, jwtSecret string, ...)
- type AuthModel
- type CustomClaims
Constants ¶
View Source
const ( ADMIN int = 1 << 0 MANAGER int = 1 << 1 USER int = 1 << 2 )
Variables ¶
View Source
var ( ManagerRoles []string AdminRoles []string UserRoles []string )
Functions ¶
func Authenticate ¶
func GenerateJWT ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.