Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var HMACSignFuncs = map[jwa.SignatureAlgorithm]hmacSignFunc{}
Functions ¶
This section is empty.
Types ¶
type ECDSASigner ¶
type ECDSASigner struct {
// contains filtered or unexported fields
}
ECDSASigner uses crypto/ecdsa to sign the payloads.
func (ECDSASigner) Algorithm ¶
func (s ECDSASigner) Algorithm() jwa.SignatureAlgorithm
type EdDSASigner ¶ added in v1.0.7
type EdDSASigner struct { }
func (EdDSASigner) Algorithm ¶ added in v1.0.7
func (s EdDSASigner) Algorithm() jwa.SignatureAlgorithm
type HMACSigner ¶
type HMACSigner struct {
// contains filtered or unexported fields
}
HMACSigner uses crypto/hmac to sign the payloads.
func (HMACSigner) Algorithm ¶
func (s HMACSigner) Algorithm() jwa.SignatureAlgorithm
type RSASigner ¶
type RSASigner struct {
// contains filtered or unexported fields
}
RSASigner uses crypto/rsa to sign the payloads.
func (RSASigner) Algorithm ¶
func (s RSASigner) Algorithm() jwa.SignatureAlgorithm
type Signer ¶
type Signer interface { // Sign creates a signature for the given `payload`. // `key` is the key used for signing the payload, and is usually // the private key type associated with the signature method. For example, // for `jwa.RSXXX` and `jwa.PSXXX` types, you need to pass the // `*"crypto/rsa".PrivateKey` type. // Check the documentation for each signer for details Sign(payload []byte, key interface{}) ([]byte, error) Algorithm() jwa.SignatureAlgorithm }
Click to show internal directories.
Click to hide internal directories.