Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( RS256 = SigningAlgorithm{ Name: "RS256", Generator: func() (crypto.PrivateKey, error) { return rsa.GenerateKey(rand.Reader, 2048) }, } ES256 = SigningAlgorithm{ Name: "ES256", Generator: func() (crypto.PrivateKey, error) { return ecdsa.GenerateKey(elliptic.P256(), rand.Reader) }, } )
View Source
var ( StaticRotation = RotationStrategy{ // contains filtered or unexported fields } )
Functions ¶
This section is empty.
Types ¶
type Keys ¶
type Keys struct { // Key for creating and verifying signatures. These may be nil. SigningKey *jose.JSONWebKey SigningKeyPub *jose.JSONWebKey // Old signing keys which have been rotated but can still be used to validate // existing signatures. VerificationKeys []VerificationKey // The next time the signing key will rotate. // // For caching purposes, implementations MUST NOT update keys before this time. NextRotation time.Time }
Keys hold signing keys.
type RotationStrategy ¶
type RotationStrategy struct {
// contains filtered or unexported fields
}
type SigningAlgorithm ¶
type SigningAlgorithm struct { Name string // TODO: use crypto.Signer instead. Generator func() (crypto.PrivateKey, error) }
type VerificationKey ¶
type VerificationKey struct { PublicKey *jose.JSONWebKey `json:"publicKey"` Expiry time.Time `json:"expiry"` }
VerificationKey is a rotated signing key which can still be used to verify signatures.
Click to show internal directories.
Click to hide internal directories.