Documentation ¶
Index ¶
- type JsonWebAlgorithm
- type JsonWebKey
- type JsonWebKeySet
- type JsonWebSignature
- func (s *JsonWebSignature) ParseCompact(jws string) error
- func (s *JsonWebSignature) ParseJSONFlattened(jws string) error
- func (s *JsonWebSignature) ParseJSONGeneral(jws string) error
- func (s *JsonWebSignature) Payload() []byte
- func (s *JsonWebSignature) Sign(header map[string]string, key *JsonWebKey) error
- func (s *JsonWebSignature) Signed() bool
- func (s *JsonWebSignature) VerifyKeySet(jwks *JsonWebKeySet) error
- func (s *JsonWebSignature) VerifyKeySingle(jwk *JsonWebKey) error
- type JsonWebToken
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JsonWebAlgorithm ¶
type JsonWebAlgorithm interface { Verify(key *JsonWebKey, input, sig []byte) error Sign(key *JsonWebKey, input []byte) ([]byte, error) }
type JsonWebKey ¶
type JsonWebKey struct {
// contains filtered or unexported fields
}
func (*JsonWebKey) UnmarshalJSON ¶
func (k *JsonWebKey) UnmarshalJSON(data []byte) (err error)
UnmarshalJSON reads a key from its JSON representation.
type JsonWebKeySet ¶
type JsonWebKeySet struct {
Keys []*JsonWebKey `json:"keys"`
}
func ParseJWKSBytes ¶
func ParseJWKSBytes(jwkSet []byte) (res *JsonWebKeySet, err error)
type JsonWebSignature ¶
type JsonWebSignature struct {
// contains filtered or unexported fields
}
JsonWebSignature follows structure defined in full jws serialization defined in rfc7515#section-7.2.1
func NewJsonWebSignature ¶
func NewJsonWebSignature(payload []byte) *JsonWebSignature
func (*JsonWebSignature) ParseCompact ¶
func (s *JsonWebSignature) ParseCompact(jws string) error
ParseCompact parses a compact serialized token defined in rfc7515#section-7.1
func (*JsonWebSignature) ParseJSONFlattened ¶
func (s *JsonWebSignature) ParseJSONFlattened(jws string) error
ParseJSONFlattened parses a json serialized token defined in rfc7515#section-7.2.2
func (*JsonWebSignature) ParseJSONGeneral ¶
func (s *JsonWebSignature) ParseJSONGeneral(jws string) error
ParseJSONGeneral parses a json serialized token defined in rfc7515#section-7.2.1
func (*JsonWebSignature) Payload ¶
func (s *JsonWebSignature) Payload() []byte
func (*JsonWebSignature) Sign ¶
func (s *JsonWebSignature) Sign(header map[string]string, key *JsonWebKey) error
func (*JsonWebSignature) Signed ¶
func (s *JsonWebSignature) Signed() bool
func (*JsonWebSignature) VerifyKeySet ¶
func (s *JsonWebSignature) VerifyKeySet(jwks *JsonWebKeySet) error
func (*JsonWebSignature) VerifyKeySingle ¶
func (s *JsonWebSignature) VerifyKeySingle(jwk *JsonWebKey) error
type JsonWebToken ¶
type JsonWebToken struct {
// contains filtered or unexported fields
}
func (*JsonWebToken) Header ¶
func (t *JsonWebToken) Header(k string) *jsontk.JSON
func (*JsonWebToken) Parse ¶
func (t *JsonWebToken) Parse(tk string) (err error)
func (*JsonWebToken) VerifyKeySet ¶
func (t *JsonWebToken) VerifyKeySet(k *JsonWebKeySet) error
Click to show internal directories.
Click to hide internal directories.