memory

package
v1.2.9 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: Apache-2.0 Imports: 4 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() (*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(reload bool) ([]common.JWTKey, error)

RefreshKeys refresh the keys from database.

func (*Memory) RotateKeys

func (m *Memory) RotateKeys() error

RotateKeys rotates the jwt secrets.

Jump to

Keyboard shortcuts

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