memory

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package memory package

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InMemoryJWSProvider

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

InMemoryJWSProvider uses a secret key stored in memory to sign JWT tokens using a SHA-256 HMAC signature algorithm

func New

func New(pluginData map[string]string) (*InMemoryJWSProvider, error)

New creates an InMemoryJWSProvider

func (*InMemoryJWSProvider) GetKeySet

func (im *InMemoryJWSProvider) GetKeySet(_ context.Context) ([]byte, error)

GetKeySet returns the JWK key set in JSON format

func (*InMemoryJWSProvider) Sign

func (im *InMemoryJWSProvider) Sign(_ context.Context, token []byte) ([]byte, error)

Sign signs a JWT payload

func (*InMemoryJWSProvider) Verify

func (im *InMemoryJWSProvider) Verify(_ context.Context, token []byte) error

Verify will return an error if the JWT does not have a valid signature

Jump to

Keyboard shortcuts

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