package
0.0.0-20230713040001-a8d6daaf8143
Repository: https://github.com/extrame/jose.git
Documentation: pkg.go.dev
# Functions
Conv converts a func(Claims) error to type jwt.ValidateFunc.
GetSigningMethod retrieves a crypto.SigningMethod from the global map.
IsMultiError returns true if the given error is type *MultiError.
New creates a JWS with the provided crypto.SigningMethods.
NewJWT creates a new JWT with the given claims.
NewValidator returns a jwt.Validator.
Parse parses any of the three serialized jws forms into a physical jws per https://tools.ietf.org/html/rfc7515#section-5.2
It accepts a json.Unmarshaler in order to properly parse the payload.
ParseCompact parses a jws serialized into its "compact" form per https://tools.ietf.org/html/rfc7515#section-7.1 into a physical jws per https://tools.ietf.org/html/rfc7515#section-5.2
For information on the json.Unmarshaler parameter, see Parse.
ParseFlat parses a jws serialized into its "flat" form per https://tools.ietf.org/html/rfc7515#section-7.2.2 into a physical jws per https://tools.ietf.org/html/rfc7515#section-5.2
For information on the json.Unmarshaler parameter, see Parse.
ParseFromForm tries to find the JWS in an http.Request form request.
ParseFromHeader tries to find the JWS in an http.Request header.
ParseFromRequest tries to find the JWS in an http.Request.
ParseGeneral parses a jws serialized into its "general" form per https://tools.ietf.org/html/rfc7515#section-7.2.1 into a physical jws per https://tools.ietf.org/html/rfc7515#section-5.2
For information on the json.Unmarshaler parameter, see Parse.
ParseJWT parses a serialized jwt.JWT into a physical jwt.JWT.
ParseJWTFromRequest tries to find the JWT in an http.Request.
RegisterSigningMethod registers the crypto.SigningMethod in the global map.
RemoveSigningMethod removes the crypto.SigningMethod from the global map.
# Variables
ErrAlgorithmDoesntExist means the algorithm asked for cannot be found inside the signingMethod cache.
ErrCannotValidate means the JWS cannot be validated for various reasons.
ErrCouldNotUnmarshal is returned when Parse's json.Unmarshaler parameter returns an error.
ErrDidNotValidate means the given JWT did not properly validate.
ErrDuplicateHeaderParameter signals that there are duplicate parameters in the provided Headers.
ErrHoldsJWE means the given JWS holds a JWE inside its payload.
ErrIsNotJWT means the given JWS is not a JWT.
ErrMismatchedAlgorithms means the algorithm inside the JWT was different than the algorithm the caller wanted to use.
ErrNoAlgorithm means no algorithm ("alg") was found in the Protected Header.
ErrNotCompact signals that the provided potential JWS is not in its compact representation.
ErrNotEnoughKeys is returned when not enough keys are provided for the given SigningMethods.
ErrNotEnoughMethods is returned if New was called _or_ the Flat/Compact methods were called with 0 SigningMethods.
ErrNotEnoughValidSignatures means the JWS did not meet the required number of signatures.
ErrNoTokenInRequest means there's no token present inside the *http.Request.
ErrTwoEmptyHeaders is returned if both Headers are empty.
IgnoreDupes should be set to true if the internal duplicate header key check should ignore duplicate Header keys instead of reporting an error when duplicate Header keys are found.
JWSFormKey is the form "key" which should be used inside ParseFromRequest if the request is a multipart.Form.
MaxMemory is maximum amount of memory which should be used inside ParseFromRequest while parsing the multipart.Form if the request is a multipart.Form.
# Structs
SigningOpts is a struct which holds options for validating JWS signatures.
# Interfaces
JWS implements a JWS per RFC 7515.
# Type aliases
Claims represents a set of JOSE Claims.
Format specifies which "format" the JWS is in -- Flat, General, or compact.
MultiError is a slice of errors.
VerifyCallback is a callback function that can be used to access header parameters to lookup needed information.