cookie

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeCookie

func MakeCookie(req *http.Request, name string, value string, expiration time.Duration) *http.Cookie

func ParseSameSite

func ParseSameSite(v string) http.SameSite

Types

type SessionState

type SessionState struct {
	CreatedAt time.Time `msgpack:"ca,omitempty"`
	ExpiresOn time.Time `msgpack:"eo,omitempty"`

	AccessToken  string `msgpack:"at,omitempty"`
	IDToken      string `msgpack:"it,omitempty"`
	RefreshToken string `msgpack:"rt,omitempty"`

	RedirectURL string `msgpack:"ru,omitempty"`
	SessionID   string `msgpack:"si,omitempty"`
	ClusterID   string `msgpack:"ci,omitempty"`
}

func Decode

func Decode(data string) (*SessionState, error)

func (*SessionState) Encode

func (s *SessionState) Encode() ([]byte, error)

Jump to

Keyboard shortcuts

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