Documentation ¶
Overview ¶
Package service contains services used by code here.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CertificateGenerator ¶
type CertificateGenerator struct {
// contains filtered or unexported fields
}
CertificateGenerator is used to generate certificates.
func NewCertificateGenerator ¶
func NewCertificateGenerator(lifeTime time.Duration) *CertificateGenerator
NewCertificateGenerator is the preferred way to instantiate a certificate generator.
func (*CertificateGenerator) CreateChild ¶
func (c *CertificateGenerator) CreateChild(parent *x509.Certificate, key interface{}) (*x509.Certificate, error)
CreateChild - creates a child certificate with given key and parent certificate.
func (*CertificateGenerator) CreateParent ¶
func (c *CertificateGenerator) CreateParent() (*x509.Certificate, error)
CreateParent generates a X.509 parent/root certificate for use in authorization servers.
type KeyStore ¶
type KeyStore struct {
// contains filtered or unexported fields
}
KeyStore is used to keep state about current JWKS and signing key.
func NewKeyStore ¶
NewKeyStore is the preferred way to instantiate a key store.
func (*KeyStore) GenerateNew ¶
GenerateNew generates a new pair of JWKS and signing key.
func (*KeyStore) GetSigningKey ¶
func (k *KeyStore) GetSigningKey() *jwtmock.SigningKey
GetSigningKey returns the currently stored signing key.
type RSAKeyGenerator ¶
type RSAKeyGenerator struct{}
RSAKeyGenerator generates key IDs and keys.
func NewRSAKeyGenerator ¶
func NewRSAKeyGenerator() *RSAKeyGenerator
NewRSAKeyGenerator is the preferred way to create a RSA key generator.
func (*RSAKeyGenerator) GenerateKey ¶
func (k *RSAKeyGenerator) GenerateKey(length int) (*jwtmock.SigningKey, error)
GenerateKey generates a RSA signing key.