token

package

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.

Source Files

Jump to

Keyboard shortcuts

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