mirror of https://github.com/dexidp/dex.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
665 B
22 lines
665 B
package server |
|
|
|
import ( |
|
"context" |
|
|
|
"github.com/go-jose/go-jose/v4" |
|
) |
|
|
|
// Signer is an interface for signing payloads and retrieving validation keys. |
|
type Signer interface { |
|
// Sign signs the provided payload. |
|
Sign(ctx context.Context, payload []byte) (string, error) |
|
|
|
// ValidationKeys returns the current public keys used for signature validation. |
|
ValidationKeys(ctx context.Context) ([]*jose.JSONWebKey, error) |
|
|
|
// Algorithm returns the signing algorithm used by this signer. |
|
Algorithm(ctx context.Context) (jose.SignatureAlgorithm, error) |
|
|
|
// Start starts any background tasks required by the signer (e.g., key rotation). |
|
Start(ctx context.Context) |
|
}
|
|
|