oauth2ns

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// IP is the ip of this machine that will be called back in the browser. It may not be a hostname.
	// If IP is not 127.0.0.1 DEVICE_NAME must be set. It can be any short string.
	IP          = "127.0.0.1"
	DEVICE_NAME = ""
	// PORT is the port that the temporary oauth server will listen on
	PORT = 14565
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthenticateUserFuncConfig

type AuthenticateUserFuncConfig struct {
	AuthCallHTTPParams url.Values
}

type AuthenticateUserOption

type AuthenticateUserOption func(*AuthenticateUserFuncConfig) error

func WithAuthCallHTTPParams

func WithAuthCallHTTPParams(values url.Values) AuthenticateUserOption

type AuthorizedClient

type AuthorizedClient struct {
	*http.Client
	Token *oauth2.Token
}

type Oauth2Cli

type Oauth2Cli struct {
}

func (*Oauth2Cli) AuthenticateUser

func (o *Oauth2Cli) AuthenticateUser(oauthConfig *oauth2.Config, options ...AuthenticateUserOption) (*AuthorizedClient, error)

AuthenticateUser starts the login process

Jump to

Keyboard shortcuts

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