token

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2022 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 8 more Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteCookie

func DeleteCookie(writer http.ResponseWriter)

DeleteCookie to delete cookie in HTTP response. It used to logout.

func ResponseToken

func ResponseToken(t *oauth2.Token, writer http.ResponseWriter) error

ResponseToken writes a cookie in HTTP response return according to the given OAuth2 token.

Types

type Token

type Token struct {
	ID      string    `json:"i"`
	Refresh string    `json:"r"`
	Expire  time.Time `json:"e"`
}

func RetrieveToken

func RetrieveToken(request *http.Request) (*Token, error)

RetrieveToken gets the idToken and related information from the cookie requested by HTTP.

Jump to

Keyboard shortcuts

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