OpenID Connect (OIDC) identity and OAuth 2.0 provider with pluggable connectors
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.
 
 
 
 
 
 

19 lines
662 B

package signer
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)
}