session

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

type Session map[string]interface{}

Session is a map respresentation of the session data

func (*Session) GetAccessToken

func (data *Session) GetAccessToken() string

GetAccessToken retrieves the access token from the session data

func (*Session) GetExpiration

func (data *Session) GetExpiration() uint64

GetExpiration returns the expiration period from the session data

func (*Session) GetOauth2Token

func (data *Session) GetOauth2Token() *goauth2.Token

GetOauth2Token returns an oauth2 token derived from the session data. Returns nil if the user is not yet signed in

func (*Session) RefreshExpiration

func (data *Session) RefreshExpiration() error

RefreshExpiration updates the 'expires' value on the session to the current time plus the expiration period

func (*Session) SetAccessToken

func (data *Session) SetAccessToken(accessToken string)

SetAccessToken sets the access token on the session data map

func (*Session) SetRefreshToken

func (data *Session) SetRefreshToken(refreshToken string)

SetRefreshToken sets the refresh token on the session data map

Jump to

Keyboard shortcuts

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