oauth

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CookieName is used in web browser to store the berear token received from
	// the OAuth2 server.
	CookieName = "kg-bearer-session-code"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type OAuth

type OAuth struct {
	APITransport *http.Transport
	Auth2Config  *oauth2.Config
}

OAuth holds information required for serving files.

func (*OAuth) Callback

func (o *OAuth) Callback(w http.ResponseWriter, r *http.Request)

Callback handle callbacs from OAuth2 authtorization server.

func (OAuth) Login

func (o OAuth) Login(w http.ResponseWriter, r *http.Request)

Login redirects to OAuth2 authtorization login endpoint.

func (OAuth) Logout

func (o OAuth) Logout(w http.ResponseWriter, r *http.Request)

Logout redirects to OAuth2 authtorization Logout endpoint.

Jump to

Keyboard shortcuts

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