Versions in this module Expand all Collapse all v0 v0.9.1 Oct 1, 2015 Changes in this version + const Any + var ErrAlgorithmDoesntExist = errors.New("algorithm doesn't exist") + var ErrCannotValidate = errors.New("cannot validate") + var ErrCouldNotUnmarshal = errors.New("custom unmarshal failed") + var ErrDidNotValidate = errors.New("did not validate") + var ErrDuplicateHeaderParameter = errors.New("duplicate parameters in the JOSE Header") + var ErrHoldsJWE = errors.New("JWS holds JWE") + var ErrIsNotJWT = errors.New("JWS is not a JWT") + var ErrMismatchedAlgorithms = errors.New("mismatched algorithms") + var ErrNoAlgorithm = errors.New("no algorithm found") + var ErrNotCompact = errors.New("not a compact JWS") + var ErrNotEnoughKeys = errors.New("not enough keys (for given methods)") + var ErrNotEnoughMethods = errors.New("not enough methods provided") + var ErrTwoEmptyHeaders = errors.New("both headers cannot be empty") + var IgnoreDupes bool + func GetSigningMethod(alg string) crypto.SigningMethod + func NewJWT(claims Claims, method crypto.SigningMethod) jwt.JWT + func ParseJWT(encoded []byte) (jwt.JWT, error) + func RegisterSigningMethod(sm crypto.SigningMethod) + func RemoveSigningMethod(sm crypto.SigningMethod) + type Claims jwt.Claims + type JWS struct + func New(content interface{}, methods ...crypto.SigningMethod) *JWS + func Parse(encoded []byte, u ...json.Unmarshaler) (*JWS, error) + func ParseCompact(encoded []byte, u ...json.Unmarshaler) (*JWS, error) + func ParseFlat(encoded []byte, u ...json.Unmarshaler) (*JWS, error) + func ParseGeneral(encoded []byte, u ...json.Unmarshaler) (*JWS, error) + func (j *JWS) Claims() jwt.Claims + func (j *JWS) Compact(key interface{}) ([]byte, error) + func (j *JWS) Flat(key interface{}) ([]byte, error) + func (j *JWS) General(keys ...interface{}) ([]byte, error) + func (j *JWS) GetProtected(key string, i ...int) interface{} + func (j *JWS) GetUnprotected(key string, i ...int) interface{} + func (j *JWS) IsJWT() bool + func (j *JWS) Payload() interface{} + func (j *JWS) RemoveProtected(key string, i ...int) + func (j *JWS) RemoveUnprotected(key string, i ...int) + func (j *JWS) Serialize(key interface{}) ([]byte, error) + func (j *JWS) SetPayload(val interface{}) + func (j *JWS) SetProtected(key string, val interface{}, i ...int) + func (j *JWS) SetUnprotected(key string, val interface{}, i ...int) + func (j *JWS) Validate(key interface{}, method crypto.SigningMethod) error + func (j *JWS) ValidateMulti(keys []interface{}, methods []crypto.SigningMethod, idx ...int) error + func (j *JWS) Verify(key interface{}, m crypto.SigningMethod, o ...jwt.Opts) error + type Opts struct + EXP int64 + Fn func(Claims) error + NBF int64 + func (o Opts) C() jwt.Opts + func (o Opts) Convert() jwt.Opts