Help us shape the future of Go! Take the 2026 Go Developer Survey

oauth2

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTokenSource

func NewTokenSource(clientid string, clientsecret string, options ...Option) oauth2.TokenSource

NewTokenSource returns a new token source for stackpath

Types

type Option

type Option func(*TokenSource)

Option is used to pass options to the client during creation

func HTTPClientOption

func HTTPClientOption(client *http.Client) Option

HTTPClientOption returns an option telling the Client to use the given http.Client

type TokenSource

type TokenSource struct {
	// contains filtered or unexported fields
}

TokenSource is an oauth2 token source for stackpath

func (*TokenSource) Token

func (sps *TokenSource) Token() (*oauth2.Token, error)

Token returns a token

Jump to

Keyboard shortcuts

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