Documentation ¶
Index ¶
Constants ¶
View Source
const ( KeyAKey = "Key-A" KeyBKey = "Key-B" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiskKeyManager ¶
type DiskKeyManager struct { // Type of key Type KeyType // Path to a key-pair file Path string // Rotation period RotationPeriod time.Duration // Check key expiration interval Interval time.Duration // KeyPair data read from file which specified by Path KeyPairs map[string]KeyPair // contains filtered or unexported fields }
func NewDiskKeyManager ¶
func (*DiskKeyManager) GenerateKey ¶
func (d *DiskKeyManager) GenerateKey() (*KeyPair, error)
func (*DiskKeyManager) GetPrivateKey ¶
func (d *DiskKeyManager) GetPrivateKey() (string, crypto.PrivateKey, error)
func (*DiskKeyManager) GetPublicKeys ¶
func (d *DiskKeyManager) GetPublicKeys() (map[string]crypto.PublicKey, error)
func (*DiskKeyManager) Initialize ¶
func (d *DiskKeyManager) Initialize() error
func (*DiskKeyManager) WriteEntry ¶
func (d *DiskKeyManager) WriteEntry() error
type KeyManager ¶
type KeyPair ¶
type KeyPair struct { // Key pair identifier. It is used as 'kid' in JWK. ID string `json:"id"` // DER encoded private-key PrivateKeyDER []byte `json:"privateKey"` // DER encoded public-key PublicKeyDER []byte `json:"publicKey"` // Time when key pair was issued IssueAt time.Time `json:"issueAt"` // Time when key pair is expired ExpireAt time.Time `json:"expireAt"` }
Click to show internal directories.
Click to hide internal directories.