Documentation ¶
Overview ¶
Package jose is DEPRECATED. Use gopkg.in/square/go-jose.v2 instead.
Index ¶
- Constants
- type Claims
- func (c Claims) Add(name string, value interface{})
- func (c Claims) Float64Claim(name string) (float64, bool, error)
- func (c Claims) Int64Claim(name string) (int64, bool, error)
- func (c Claims) StringClaim(name string) (string, bool, error)
- func (c Claims) StringsClaim(name string) ([]string, bool, error)
- func (c Claims) TimeClaim(name string) (time.Time, bool, error)
- type JOSEHeader
- type JWK
- type JWKSet
- type JWS
- type JWT
- type Signer
- type SignerRSA
- type Verifier
- type VerifierRSA
Constants ¶
View Source
const ( HeaderMediaType = "typ" HeaderKeyAlgorithm = "alg" HeaderKeyID = "kid" )
View Source
const ( // Encryption Algorithm Header Parameter Values for JWS // See: https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40#page-6 AlgHS256 = "HS256" AlgHS384 = "HS384" AlgHS512 = "HS512" AlgRS256 = "RS256" AlgRS384 = "RS384" AlgRS512 = "RS512" AlgES256 = "ES256" AlgES384 = "ES384" AlgES512 = "ES512" AlgPS256 = "PS256" AlgPS384 = "PS384" AlgPS512 = "PS512" AlgNone = "none" )
View Source
const ( // Algorithm Header Parameter Values for JWE // See: https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40#section-4.1 AlgRSA15 = "RSA1_5" AlgRSAOAEP = "RSA-OAEP" AlgRSAOAEP256 = "RSA-OAEP-256" AlgA128KW = "A128KW" AlgA192KW = "A192KW" AlgA256KW = "A256KW" AlgDir = "dir" AlgECDHES = "ECDH-ES" AlgECDHESA128KW = "ECDH-ES+A128KW" AlgECDHESA192KW = "ECDH-ES+A192KW" AlgECDHESA256KW = "ECDH-ES+A256KW" AlgA128GCMKW = "A128GCMKW" AlgA192GCMKW = "A192GCMKW" AlgA256GCMKW = "A256GCMKW" AlgPBES2HS256A128KW = "PBES2-HS256+A128KW" AlgPBES2HS384A192KW = "PBES2-HS384+A192KW" AlgPBES2HS512A256KW = "PBES2-HS512+A256KW" )
View Source
const ( // Encryption Algorithm Header Parameter Values for JWE // See: https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40#page-22 EncA128CBCHS256 = "A128CBC-HS256" EncA128CBCHS384 = "A128CBC-HS384" EncA256CBCHS512 = "A256CBC-HS512" EncA128GCM = "A128GCM" EncA192GCM = "A192GCM" EncA256GCM = "A256GCM" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JOSEHeader ¶
func (JOSEHeader) Validate ¶
func (j JOSEHeader) Validate() error
type JWK ¶
type JWK struct { ID string Type string Alg string Use string Exponent int Modulus *big.Int Secret []byte }
JSON Web Key https://tools.ietf.org/html/draft-ietf-jose-json-web-key-36#page-5
func (*JWK) MarshalJSON ¶
func (*JWK) UnmarshalJSON ¶
type JWS ¶
type JWS struct { RawHeader string Header JOSEHeader RawPayload string Payload []byte Signature []byte }
type JWT ¶
type JWT JWS
type SignerRSA ¶
type SignerRSA struct { PrivateKey rsa.PrivateKey VerifierRSA }
func NewSignerRSA ¶
func NewSignerRSA(kid string, key rsa.PrivateKey) *SignerRSA
type Verifier ¶
func NewVerifier ¶
type VerifierRSA ¶
func NewVerifierRSA ¶
func NewVerifierRSA(jwk JWK) (*VerifierRSA, error)
func (*VerifierRSA) Alg ¶
func (v *VerifierRSA) Alg() string
func (*VerifierRSA) ID ¶
func (v *VerifierRSA) ID() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.