keystore

package
v0.0.0-...-cbad50d Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package keystore implements an in-memory keystore for JWT support.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyStore

type KeyStore struct {
	// contains filtered or unexported fields
}

KeyStore represents an in memory store implementation of KeyLookup interface.

func New

func New() *KeyStore

New constructs an empty KeyStore, ready to be used.

func (*KeyStore) LoadRSAKeys

func (ks *KeyStore) LoadRSAKeys(fsys fs.FS) error

LoadRSAKeys loads a set of RSA pems. Name of pem file will be used as key id.

func (*KeyStore) PrivateKey

func (ks *KeyStore) PrivateKey(kid string) (string, error)

PrivateKey searches the keystore for a specific key id and returns private key.

func (*KeyStore) PublicKey

func (ks *KeyStore) PublicKey(kid string) (string, error)

PublicKey searches the keystore for a specific key id and returns public key.

Jump to

Keyboard shortcuts

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