Versions in this module Expand all Collapse all v0 v0.7.1 Aug 12, 2020 Changes in this version + var ErrKeysExist = errors.New("keys with kid exist in repository and are valid") + var ErrKeysExistInvalid = errors.New("keys with kid exist in repository and are not valid") + var ErrKeysExpired = errors.New("keys with kid exist in repository, marked as expired, must be deleted") + var ErrKeysInvalid = errors.New("keys with kid exist in repository and are not valid") + var ErrKeysNotFound = errors.New("keys with kid not found in repository") + type DefaultOptions struct + AuthTTL time.Duration + ContEnc string + EncAlg string + EncBits int + Expiry time.Duration + RefreshStrategy string + RefreshTTL time.Duration + SigAlg string + SigBits int + type InfoSet struct + AuthTTL int64 + ContEnc string + Enc []byte + Expired bool + Expiry int64 + KID string + Locked bool + RefreshStrategy string + RefreshTTL int64 + Sig []byte + Valid bool + type JWTKeysIssuerSet struct + AuthTTL time.Duration + ContEnc jose.ContentEncryption + Enc jose.JSONWebKey + EncOpts jwtis.KeyOptions + Expiry jwt.NumericDate + KID []byte + Locked bool + RefreshStrategy string + RefreshTTL time.Duration + Sig jose.JSONWebKey + SigOpts jwtis.KeyOptions + func (k *JWTKeysIssuerSet) Expired() bool + func (k *JWTKeysIssuerSet) Public() SigEncKeys + func (k *JWTKeysIssuerSet) Valid() bool + func (k *JWTKeysIssuerSet) Validate() bool + type RepoOptions struct + Opts *DefaultOptions + Prefix string + Store *svalkey.Store + type Repository struct + func New(repoOpts *RepoOptions) (*Repository, error) + func (p *Repository) AddKey(key *JWTKeysIssuerSet) (*SigEncKeys, error) + func (p *Repository) DelKey(kid string) error + func (p *Repository) GetPrivateKeys(kid string) (SigEncKeys, error) + func (p *Repository) GetPublicKeys(kid string) (*SigEncKeys, error) + func (p *Repository) KeyExists(kid []byte) (bool, *JWTKeysIssuerSet, error) + func (p *Repository) ListKeys() ([]InfoSet, error) + func (p *Repository) NewKey(kid string, opts *DefaultOptions) (*SigEncKeys, error) + type SigEncKeys struct + ContEnc jose.ContentEncryption + Enc jose.JSONWebKey + Expiry jwt.NumericDate + RefreshStrategy string + Sig jose.JSONWebKey + Valid bool