session

package
v0.0.0-...-be84f31 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SPOTIFY_TOKEN_SESSION_KEY     = "spotify-token"
	GOOGLE_USER_TOKEN_SESSION_KEY = "google-user"
	SESSION_NAME                  = "token-session"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type SessionManager

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

func New

func New() SessionManager

TODO use a proper cookie store

func (SessionManager) GetSessionTokens

func (s SessionManager) GetSessionTokens(provider string, r *http.Request) (*oauth2.Token, error)

func (SessionManager) RefreshToken

func (s SessionManager) RefreshToken(
	providerName string,
	r *http.Request,
	w http.ResponseWriter) (*oauth2.Token, error)

func (SessionManager) UpdateTokens

func (s SessionManager) UpdateTokens(provider string, tokens *oauth2.Token, r *http.Request, w http.ResponseWriter) error

Jump to

Keyboard shortcuts

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