package
0.0.3
Repository: https://github.com/katell-coder/core-dm.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

ExtractClaims help to extract the JWT claims.
ExtractClaimsFromToken help to extract the JWT claims from token.
GetToken help to get the JWT token string.
New for check error with GinJWTMiddleware.

# Constants

No description provided by the author

# Variables

No description provided by the author
RoleIdKey 部门id.
RoleKey 部门名称.
ErrEmptyAuthHeader can be thrown if authing with a HTTP header, the Auth header needs to be set.
ErrEmptyCookieToken can be thrown if authing with a cookie, the token cokie is empty.
ErrEmptyParamToken can be thrown if authing with parameter in path, the parameter in path is empty.
ErrEmptyQueryToken can be thrown if authing with URL Query, the query token variable is empty.
ErrExpiredToken indicates JWT token has expired.
ErrFailedAuthentication indicates authentication failed, could be faulty username or password.
ErrFailedTokenCreation indicates JWT Token failed to create, reason unknown.
ErrForbidden when HTTP status 403 is given.
ErrInvalidAuthHeader indicates auth header is invalid, could for example have the wrong Realm name.
ErrInvalidPrivKey indicates that the given private key is invalid.
ErrInvalidPubKey indicates the the given public key is invalid.
ErrInvalidSigningAlgorithm indicates signing algorithm is invalid, needs to be HS256, HS384, HS512, RS256, RS384 or RS512.
No description provided by the author
ErrMissingAuthenticatorFunc indicates Authenticator is required.
ErrMissingExpField missing exp field in token.
ErrMissingLoginValues indicates a user tried to authenticate without username or password.
ErrMissingSecretKey indicates Secret key is required.
ErrNoPrivKeyFile indicates that the given private key is unreadable.
ErrNoPubKeyFile indicates that the given public key is unreadable.
ErrWrongFormatOfExp field must be float64 format.
IdentityKey default identity key.
NiceKey 昵称.
No description provided by the author
RoleIdKey 角色id Old.
RoleKey 角色名称 Old.
RoleNameKey 角色名称 Old.

# Structs

GinJWTMiddleware provides a Json-Web-Token authentication implementation.

# Type aliases

No description provided by the author