Documentation ¶
Index ¶
- func CreateAccessToken(ident *datatypes.UUID, duration time.Duration, scope *string) (string, error)
- func CreateRefreshToken(ident *datatypes.UUID, duration time.Duration, scope *string) (string, error)
- func GetClaimsIfAccessTokenIsValid(tokenString string) (*jwt.MapClaims, error)
- func GetClaimsIfRefreshTokenIsValid(tokenString string) (*jwt.MapClaims, error)
- func GetVerifiedAuthUser(userModel models.IModel) (models.IModel, bool)
- func HashAndSalt(pwd string) (string, error)
- func IsSamePassword(plainPwd string, hashedPwd string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAccessToken ¶
func CreateAccessToken(ident *datatypes.UUID, duration time.Duration, scope *string) (string, error)
CreateAccessToken creates a new JWT token
func CreateRefreshToken ¶
func CreateRefreshToken(ident *datatypes.UUID, duration time.Duration, scope *string) (string, error)
CreateRefreshToken creates a new JWT token
func GetClaimsIfAccessTokenIsValid ¶
GetClaimsIfAccessTokenIsValid validates this token and get the ISS claim
func GetClaimsIfRefreshTokenIsValid ¶
GetClaimsIfRefreshTokenIsValid validates this token and get the ISS claim
func GetVerifiedAuthUser ¶ added in v0.1.36
GetVerifiedAuthUser authenticates the user
func HashAndSalt ¶
HashAndSalt turns password into encrypted hash The salt is included in the hash
func IsSamePassword ¶
IsSamePassword checks if password is the same as in the db
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.