cookie

package
v0.0.0-...-b938584 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AUTH_HEADER          = "authorization"
	REFRESH_TOKEN_HEADER = "x-refresh-token"
)

Variables

This section is empty.

Functions

func GetAccessToken

func GetAccessToken(c *gin.Context) (string, error)

func GetRefreshToken

func GetRefreshToken(c *gin.Context) (string, error)

Types

type CookieManager

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

func NewCookie

func NewCookie(cfg *config.Config) *CookieManager

func (*CookieManager) SetAccessToken

func (cm *CookieManager) SetAccessToken(c *gin.Context, token string, age int64)

func (*CookieManager) SetRefreshToken

func (cm *CookieManager) SetRefreshToken(c *gin.Context, token string, age int64)

Jump to

Keyboard shortcuts

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