models

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Claims

type Claims struct {
	Field map[string]interface{} `json:"field"`
	jwt.StandardClaims
}

func (*Claims) Fields

func (c *Claims) Fields() map[string]interface{}

func (*Claims) Get

func (c *Claims) Get(key string) interface{}

func (*Claims) Set

func (c *Claims) Set(key string, value interface{})

type Token

type Token struct {
	RefreshToken string `json:"refresh_token" bson:"refresh_token"`
	AccessToken  string `json:"access_token" bson:"access_token"`
	ExpiresAt    int64  `json:"expires_at" bson:"expiresAt"` // RefreshToken expiry
}

type TokenStore

type TokenStore interface {
	Store(tokenID, refreshToken, accessToken string) error
	Retrieve(refreshToken string) (accessToken string)
	Destroy(refreshToken string) error
}

Jump to

Keyboard shortcuts

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