Documentation ¶
Index ¶
- type Service
- func (s *Service) AddPrivateKey(keyID string, privateKey crypto.PrivateKey) error
- func (s *Service) GetJWK(keyID string) (jose.JSONWebKey, error)
- func (s *Service) GetJWKS() jose.JSONWebKeySet
- func (s *Service) GetPrivateKey(keyID string) (crypto.PrivateKey, error)
- func (s *Service) GetPublicKey(keyID string) (crypto.PublicKey, error)
- func (s *Service) GetServerPrivateKey() crypto.PrivateKey
- func (s *Service) GetServerPublicKey() crypto.PublicKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides functionality for managing signing keys used to sign and verify JWT tokens for the OSS version of Grafana.
The service is under active development and is not yet ready for production use.
func (*Service) AddPrivateKey ¶
func (s *Service) AddPrivateKey(keyID string, privateKey crypto.PrivateKey) error
AddPrivateKey adds a private key to the service
func (*Service) GetJWK ¶
GetJWK returns the JSON Web Key (JWK) with the specified key ID which can be used to verify tokens (public key)
func (*Service) GetJWKS ¶
func (s *Service) GetJWKS() jose.JSONWebKeySet
GetJWKS returns the JSON Web Key Set (JWKS) with all the keys that can be used to verify tokens (public keys)
func (*Service) GetPrivateKey ¶
func (s *Service) GetPrivateKey(keyID string) (crypto.PrivateKey, error)
GetPrivateKey returns the private key with the specified key ID
func (*Service) GetPublicKey ¶
GetPublicKey returns the public key with the specified key ID
func (*Service) GetServerPrivateKey ¶
func (s *Service) GetServerPrivateKey() crypto.PrivateKey
GetServerPrivateKey returns the private key used to sign tokens
func (*Service) GetServerPublicKey ¶
GetServerPrivateKey returns the private key used to sign tokens