Documentation
¶
Index ¶
Constants ¶
View Source
const (
// RS256 represents a cryptography key generated by an RSA algorithm.
RS256 = "RS256"
)
Variables ¶
View Source
var ( // ErrKIDNotFound indicates that the given key ID was not found in the JWKS. ErrKIDNotFound = errors.New("the given key ID was not found in the JWKS") // ErrNotExpectedKeyType indicates that the given public key was not of the expected type. ErrNotExpectedKeyType = errors.New("the public key was not of the expected type") )
View Source
var ( // ErrUnsupportedKeyType indicates the JWT key type is an unsupported type. ErrUnsupportedKeyType = errors.New("the JWT key type is unsupported") )
Functions ¶
This section is empty.
Types ¶
type JSONKey ¶
type JSONKey struct {
Exponent string `json:"e"`
ID string `json:"kid"`
Alg string `json:"alg"`
Modulus string `json:"n"`
// contains filtered or unexported fields
}
JSONKey represents a raw key inside a JWKS.
type Keystore ¶
Keystore represents a JWKS.
func New ¶ added in v0.0.4
func New(keystoreBytes json.RawMessage) (keystore Keystore, err error)
New creates a new JWKS from a raw JSON message.
Click to show internal directories.
Click to hide internal directories.