Versions in this module Expand all Collapse all v1 v1.0.0 Mar 2, 2021 Changes in this version + const ADMIN + const MANAGER + const USER + var AdminRoles []string + var HASH_LENGTH int + var ISSUER string + var ITERATIONS int + var JWTSECRET string + var ManagerRoles []string + var TIME_PERIOD int64 + var UserRoles []string + 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 struct + Password []byte + Role string + Salt []byte + Username string + func CreateModel(username, password, role string) AuthModel + type CustomClaims struct + ExpiresAt int64 + IssuedAt int64 + Issuer string + Role string + User string + func (c CustomClaims) Valid() error