oauth2ns

package
v0.0.0-...-194279b Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAuthTimeout   = fmt.Errorf(message.AuthenticationTimedOut)
	ErrNilAuthConfig = stacktrace.NewError("oauthConfig can't be nil")
)

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
}

func AuthenticateUser

func 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