memory

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Memory

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

Memory is an implementation of Interface for memory auth.

func NewMemory

func NewMemory(ctx context.Context) (*Memory, error)

NewMemory init new memory interface. Memory is used mainly for testing do NOT use in production.

func (*Memory) GetCurrentKey

func (m *Memory) GetCurrentKey() common.JWTKey

GetCurrentKey fetch latest key from cache, it should have privatekey.

func (*Memory) GetKeys

func (m *Memory) GetKeys() []common.JWTKey

GetKeys fetch all keys from cache.

func (*Memory) RefreshKeys

func (m *Memory) RefreshKeys(ctx context.Context, reload bool) ([]common.JWTKey, error)

RefreshKeys refresh the keys from database.

func (*Memory) RotateKeys

func (m *Memory) RotateKeys(ctx context.Context) error

RotateKeys rotates the jwt secrets.

Jump to

Keyboard shortcuts

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