Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JsonWebKey ¶
type JsonWebKey struct { ID string `json:"kid"` Algorithm encryption.EncryptionKey `json:"alg"` AlgorithmFamily encryption.EncryptionKeyType `json:"kty"` Use string `json:"use"` X5C []string `json:"x5c"` Exponent string `json:"e,omitempty"` Modulus string `json:"n,omitempty"` Curve string `json:"curve,omitempty"` X string `json:"x,omitempty"` Y string `json:"y,omitempty"` Thumbprint string `json:"x5t"` }
func Decode ¶
func Decode(jwk string) (*JsonWebKey, error)
func NewKey ¶
func NewKey(privateKey interface{}) *JsonWebKey
func NewKeyWithId ¶
func NewKeyWithId(id string, privateKey interface{}) *JsonWebKey
func (JsonWebKey) GetKey ¶
func (k JsonWebKey) GetKey() interface{}
func (JsonWebKey) GetPublicKeyAt ¶
func (k JsonWebKey) GetPublicKeyAt(index int) interface{}
func (JsonWebKey) Validate ¶
func (k JsonWebKey) Validate(key interface{}) bool
type JsonWebKeys ¶
type JsonWebKeys struct {
Keys []*JsonWebKey `json:"keys"`
}
func New ¶
func New() *JsonWebKeys
func (*JsonWebKeys) Add ¶
func (jk *JsonWebKeys) Add(id string, privateKey interface{})
Click to show internal directories.
Click to hide internal directories.