oauth2

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2022 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	*oauth2.Config
	AuthURLOptions  []oauth2.AuthCodeOption
	ExchangeOptions []oauth2.AuthCodeOption
	ValidateState   func(context.Context, string) error
	PersistState    func(context.Context) (string, error)
}

Config provides parameters for beginning and validating oauth2 flow from Salesforce

func (*Config) AuthURL

func (c *Config) AuthURL(ctx context.Context) (string, error)

AuthURL builds the url for beginning the Salesforce oauth process. The web server should redirect the user to this url

func (*Config) HandleCallback

func (c *Config) HandleCallback(ctx context.Context, req *http.Request) (*oauth2.Token, error)

HandleCallback verifies a callback's state and code values

Jump to

Keyboard shortcuts

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