signingkeysimpl

package
v0.0.0-...-fb7f86c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2023 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

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 ProvideEmbeddedSigningKeysService

func ProvideEmbeddedSigningKeysService() (*Service, error)

func (*Service) AddPrivateKey

func (s *Service) AddPrivateKey(keyID string, privateKey crypto.PrivateKey) error

AddPrivateKey adds a private key to the service

func (*Service) GetJWK

func (s *Service) GetJWK(keyID string) (jose.JSONWebKey, error)

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

func (s *Service) GetPublicKey(keyID string) (crypto.PublicKey, error)

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

func (s *Service) GetServerPublicKey() crypto.PublicKey

GetServerPrivateKey returns the private key used to sign tokens

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL