Documentation ¶
Index ¶
Constants ¶
View Source
const ( HeaderTypeJwt = "JWT" HeaderTypeWst = "WST" HeaderTypeKey = "typ" HeaderAlgorithmKey = "alg" HeaderContentTypeKey = "cty" ClaimsUssuerKey = "iss" ClaimsSubjectKey = "sub" ClaimsAudienceKey = "aud" CLaimsJwtId = "jti" ClaimsIssuedAtKey = "iat" ClaimsExpireAtKey = "exp" ClaimsNotBeforeKey = "nbf" )
View Source
const ( EncodeAscii85 encodeType = "ascii85" EncodeBase32 encodeType = "base32" EncodeBase64 encodeType = "base64" EncodeHexadecimal encodeType = "hexadecimal" EncodeCipher encodeType = "cipher" )
View Source
const ( SignatureES256 signature = "ES256" SignatureES384 signature = "ES384" SignatureES512 signature = "ES512" SignatureRS256 signature = "RS256" SignatureRS384 signature = "RS384" SignatureRS512 signature = "RS512" SignaturePS256 signature = "PS256" SignaturePS384 signature = "PS384" SignaturePS512 signature = "PS512" SignatureHS256 signature = "HS256" SignatureHS384 signature = "HS384" SignatureHS512 signature = "HS512" SignatureNONE signature = "NONE" )
Variables ¶
View Source
var ( ErrorInvalidAuthorization = errors.New(errors.LevelError, http.StatusUnauthorized, "invalid authorization") ErrorInvalidSignatureMethod = errors.New(errors.LevelError, http.StatusUnauthorized, "invalid signature method") ErrorInvalidJwtAlgorithm = errors.New(errors.LevelError, http.StatusUnauthorized, "invalid signature method") ErrorClaimsValidation = errors.New(errors.LevelError, http.StatusUnauthorized, "error on claims validation") ErrorCipherTextTooShort = errors.New(errors.LevelError, http.StatusUnauthorized, "cipher text too short") )
Functions ¶
func WithCipherSecret ¶
func WithCipherSecret(secret []byte)
Types ¶
Click to show internal directories.
Click to hide internal directories.