Documentation ¶
Index ¶
- Constants
- type Claims
- func (c Claims) Add(name string, value interface{})
- 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 JWS
- type JWT
- type Signer
- type SignerHMAC
- type SignerRSA
- type Verifier
- type VerifierHMAC
- type VerifierRSA
Constants ¶
View Source
const ( HeaderMediaType = "typ" HeaderKeyAlgorithm = "alg" HeaderKeyID = "kid" )
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 SignerHMAC ¶
type SignerHMAC struct {
VerifierHMAC
}
func NewSignerHMAC ¶
func NewSignerHMAC(kid string, secret []byte) *SignerHMAC
type SignerRSA ¶
type SignerRSA struct { PrivateKey rsa.PrivateKey VerifierRSA }
func NewSignerRSA ¶
func NewSignerRSA(kid string, key rsa.PrivateKey) *SignerRSA
type Verifier ¶
func NewVerifier ¶
type VerifierHMAC ¶
func NewVerifierHMAC ¶
func NewVerifierHMAC(jwk JWK) (*VerifierHMAC, error)
func (*VerifierHMAC) Alg ¶
func (v *VerifierHMAC) Alg() string
func (*VerifierHMAC) ID ¶
func (v *VerifierHMAC) ID() string
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.