jwt_token_cache

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 License: MIT Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CachedJwtToken

type CachedJwtToken struct {
	TokenType   string `json:"token_type"`
	ExpiresIn   int    `json:"expires_in"`
	AccessToken string `json:"access_token"`
}

func (CachedJwtToken) IsExpired

func (t CachedJwtToken) IsExpired() bool

type TokenCacheItem

type TokenCacheItem struct {
	Name  string
	Token CachedJwtToken
}

type TokenCacheService

type TokenCacheService struct {
	Items []TokenCacheItem
}

func New

func New() *TokenCacheService

func (*TokenCacheService) Get

func (c *TokenCacheService) Get(name string) *CachedJwtToken

func (*TokenCacheService) Set

func (c *TokenCacheService) Set(name string, token CachedJwtToken)

Jump to

Keyboard shortcuts

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