cookie

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AccessTokenCookieName  = "cshtrka"
	RefreshTokenCookieName = "cshtrkr"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	AccessToken           string `json:"accessToken,omitempty"`
	AccessTokenExpiredAt  string `json:"accessTokenExpiredAt,omitempty"`
	RefreshToken          string `json:"refreshToken,omitempty"`
	RefreshTokenExpiredAt string `json:"refreshTokenExpiredAt,omitempty"`
}

func ReadAuthCookie

func ReadAuthCookie(ctx *fasthttp.RequestCtx) Auth

func (Auth) CanRefresh

func (a Auth) CanRefresh() bool

func (Auth) GetRefreshTokenExpireDate

func (a Auth) GetRefreshTokenExpireDate() time.Time

func (Auth) IsLogged

func (a Auth) IsLogged() bool

func (Auth) WriteCookie

func (a Auth) WriteCookie(ctx *fasthttp.RequestCtx)

Jump to

Keyboard shortcuts

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