tokencache

package
v0.0.0-...-ee64981 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2020 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 Cache

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

Cache for signed JSON Web Tokens

func New

func New(defaultExpiration, cleanupInterval time.Duration) *Cache

New creates a new token cache

func (*Cache) Add

func (c *Cache) Add(key, token string)

Add the token with the cache with the given key

func (*Cache) Get

func (c *Cache) Get(key string) (token string, ok bool)

Get a token from the cache

Jump to

Keyboard shortcuts

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