github.com/Aoi-hosizora/ahlib-more@v1.5.1-0.20230404072844-256112befaf6/xjwt/README.md (about) 1 # xjwt 2 3 ## Dependencies 4 5 + github.com/Aoi-hosizora/ahlib 6 + github.com/golang-jwt/jwt 7 8 ## Documents 9 10 ### Types 11 12 + None 13 14 ### Variables 15 16 + None 17 18 ### Constants 19 20 + None 21 22 ### Functions 23 24 + `func GenerateToken(method jwt.SigningMethod, claims jwt.Claims, key interface{}) (string, error)` 25 + `func GenerateTokenWithHS256(claims jwt.Claims, secret []byte) (string, error)` 26 + `func GenerateTokenWithHS384(claims jwt.Claims, secret []byte) (string, error)` 27 + `func GenerateTokenWithHS512(claims jwt.Claims, secret []byte) (string, error)` 28 + `func ParseToken(signedToken string, secret []byte, claims jwt.Claims, options ...jwt.ParserOption) (*jwt.Token, error)` 29 + `func ParseTokenClaims(signedToken string, secret []byte, claims jwt.Claims, options ...jwt.ParserOption) (jwt.Claims, error)` 30 + `func CheckValidationError(err error, flag uint32) bool` 31 + `func IsAudienceError(err error) bool` 32 + `func IsExpiredError(err error) bool` 33 + `func IsIdError(err error) bool` 34 + `func IsIssuedAtError(err error) bool` 35 + `func IsIssuerError(err error) bool` 36 + `func IsNotValidYetError(err error) bool` 37 + `func IsTokenInvalidError(err error) bool` 38 + `func IsClaimsInvalidError(err error) bool` 39 40 ### Methods 41 42 + None