backends

package
v1.2.7 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RSAKeyTokenBackend

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

RSAKeyTokenBackend hold asymentric keys from RS family.

func NewRSAKeyTokenBackend

func NewRSAKeyTokenBackend(k map[string]interface{}) *RSAKeyTokenBackend

NewRSAKeyTokenBackend returns RSKeyTokenBackend instance.

func (*RSAKeyTokenBackend) ProvideKey

func (b *RSAKeyTokenBackend) ProvideKey(token *jwtlib.Token) (interface{}, error)

ProvideKey provides key material from RSKeyTokenBackend.

type SecretKeyTokenBackend

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

SecretKeyTokenBackend hold symentric keys from HS family.

func NewSecretKeyTokenBackend

func NewSecretKeyTokenBackend(s string) (*SecretKeyTokenBackend, error)

NewSecretKeyTokenBackend returns SecretKeyTokenBackend instance.

func (*SecretKeyTokenBackend) ProvideKey

func (b *SecretKeyTokenBackend) ProvideKey(token *jwtlib.Token) (interface{}, error)

ProvideKey provides key material from SecretKeyTokenBackend.

type TokenBackend

type TokenBackend interface {
	ProvideKey(token *jwtlib.Token) (interface{}, error)
}

TokenBackend is the interface to provide key material.

Jump to

Keyboard shortcuts

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