Documentation
¶
Index ¶
- Constants
- type Provider
- func (p *Provider) AddPublicKey(key publickey.PublicKey) error
- func (p Provider) CurrentKey() publickey.PublicKey
- func (p Provider) Header(h *jwt.Header)
- func (p *Provider) RemovePublicKey(keyid string)
- func (p Provider) Sign(c []byte) ([]byte, error)
- func (p Provider) Verify(data, sig []byte, h jwt.Header) error
- type Settings
Constants ¶
const ( // PS256 is RSASSA-PSS using SHA-256 and MGF1 with SHA-256 PS256 = 1 // PS384 is RSASSA-PSS using SHA-384 and MGF1 with SHA-384 PS384 = 2 // PS512 is RSASSA-PSS using SHA-512 and MGF1 with SHA-512 PS512 = 3 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider provides RSASSA-PSS using SHA2 and MGF1 with SHA2 JWS signing and verification
func LoadProvider ¶
LoadProvider returns a Provider using the supplied keypairs
func NewProvider ¶
NewProvider creates a new Provider generating the necessary keypairs
func NewProviderWithKeyURL ¶
NewProviderWithKeyURL works just like NewProvider but also sets the key URL of the generated keys
func (*Provider) AddPublicKey ¶
AddPublicKey adds a public key for verification
func (Provider) CurrentKey ¶
CurrentKey returns the public key belonging to the private key used for signing.
func (Provider) Header ¶
func (p Provider) Header(h *jwt.Header)
Header sets the necessary JWT header fields
func (*Provider) RemovePublicKey ¶
RemovePublicKey removes a public key by it's key ID from the verification set
type Settings ¶
type Settings struct {
// contains filtered or unexported fields
}
Settings stores the key for an algorithm
func NewSettings ¶
NewSettings creates new signature settings for the parameters