package
0.0.0-20241028021611-85c26eb2e2be
Repository: https://github.com/seedlings-calm/prst.git
Documentation: pkg.go.dev

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ExtractClaims help to extract the JWT claims.
ExtractClaimsFromToken help to extract the JWT claims from token.
GetToken help to get the JWT token string.
No description provided by the author
IsEmptyStruct 判断结构体是否为空.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
New for check error with GinJWTMiddleware.
No description provided by the author
NewResponse 创建一个新的响应.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

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 cookie 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.
in practice, this is generated from the jwt library not by us.
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.
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.
No description provided by the author

# Structs

GinJWTMiddleware provides a Json-Web-Token authentication implementation.
Response 定义通用的 HTTP 响应结构.

# Type aliases

MapClaims type that uses the map[string]interface{} for JSON decoding This is the default claims type if you don't supply one.