Versions in this module Expand all Collapse all v0 v0.1.0 Sep 3, 2015 Changes in this version + var ErrorNoKeys = errors.New("no keys found") + var ErrorPrivateKeysExpired = errors.New("private keys have expired") + func Sync(r ReadableKeySetRepo, w WritableKeySetRepo) (time.Duration, error) + type GeneratePrivateKeyFunc func() (*PrivateKey, error) + type KeySet interface + ExpiresAt func() time.Time + type KeySetSyncer struct + func NewKeySetSyncer(r ReadableKeySetRepo, w WritableKeySetRepo) *KeySetSyncer + func (s *KeySetSyncer) Run() chan struct{} + type PrivateKey struct + KeyID string + PrivateKey *rsa.PrivateKey + func GeneratePrivateKey() (*PrivateKey, error) + func (k *PrivateKey) ID() string + func (k *PrivateKey) JWK() jose.JWK + func (k *PrivateKey) Signer() jose.Signer + type PrivateKeyManager interface + ExpiresAt func() time.Time + JWKs func() ([]jose.JWK, error) + PublicKeys func() ([]PublicKey, error) + Signer func() (jose.Signer, error) + func NewPrivateKeyManager() PrivateKeyManager + type PrivateKeyRotator struct + func NewPrivateKeyRotator(repo PrivateKeySetRepo, ttl time.Duration) *PrivateKeyRotator + func (r *PrivateKeyRotator) Healthy() error + func (r *PrivateKeyRotator) Run() chan struct{} + type PrivateKeySet struct + ActiveKeyID string + func NewPrivateKeySet(keys []*PrivateKey, exp time.Time) *PrivateKeySet + func (s *PrivateKeySet) Active() *PrivateKey + func (s *PrivateKeySet) ExpiresAt() time.Time + func (s *PrivateKeySet) Keys() []*PrivateKey + type PrivateKeySetRepo interface + func NewPrivateKeySetRepo() PrivateKeySetRepo + type PublicKey struct + func NewPublicKey(jwk jose.JWK) *PublicKey + func (k *PublicKey) ID() string + func (k *PublicKey) Verifier() (jose.Verifier, error) + type PublicKeySet struct + func NewPublicKeySet(jwks []jose.JWK, exp time.Time) *PublicKeySet + func (s *PublicKeySet) ExpiresAt() time.Time + func (s *PublicKeySet) Key(id string) *PublicKey + func (s *PublicKeySet) Keys() []PublicKey + type ReadableKeySetRepo interface + Get func() (KeySet, error) + type WritableKeySetRepo interface + Set func(KeySet) error