oauth2client

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2023 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthCodeOption

type AuthCodeOption interface {
	// contains filtered or unexported methods
}

func SetAuthURLParam

func SetAuthURLParam(key, value string) AuthCodeOption

type Client

type Client struct {
}

func NewOAuth2Client

func NewOAuth2Client() *Client

func (*Client) AuthCodeURL

func (c *Client) AuthCodeURL(_ context.Context, cfg oauth2.Config, state string, opts ...AuthCodeOption) string

func (*Client) AuthCodeURLWithPAR

func (c *Client) AuthCodeURLWithPAR(
	ctx context.Context,
	cfg oauth2.Config,
	parEndpoint string,
	state string,
	client *http.Client,
	opts ...AuthCodeOption,
) (string, error)

func (*Client) Exchange

func (c *Client) Exchange(
	ctx context.Context,
	cfg oauth2.Config,
	code string,
	client *http.Client,
	opts ...AuthCodeOption,
) (*oauth2.Token, error)

func (*Client) GeneratePKCE

func (c *Client) GeneratePKCE() (string, string, string, error)

func (*Client) GeneratePKCEFromBytes

func (c *Client) GeneratePKCEFromBytes(b []byte) (string, string, string, error)

Jump to

Keyboard shortcuts

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