auth

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Overview

Package auth defines the Credentials tokensource which allows caching of oauth2 tokens

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PasswordConfig

type PasswordConfig struct {
	Host          string         `json:"host,omitempty"`
	APIVersion    string         `json:"api_version,omitempty"`
	ClientID      string         `json:"client_id,omitempty"`
	ClientSecret  string         `json:"client_secret,omitempty"`
	Username      string         `json:"username,omitempty"`
	Password      string         `json:"password,omitempty"`
	SecurityToken string         `json:"security_token,omitempty"`
	ForSandbox    bool           `json:"sandbox,omitempty"`
	F             ctxclient.Func `json:"-"`
}

PasswordConfig contains all settings needed for the username-password flow for special scenarios. More details may be found at: https://help.salesforce.com/s/articleView?id=sf.remoteaccess_oauth_username_password_flow.htm&type=5

func (*PasswordConfig) Service

func (pc *PasswordConfig) Service(tk *oauth2.Token) *salesforce.Service

Service creates a service that authenticates using a token created from username and password.

func (*PasswordConfig) TokenSource

func (pc *PasswordConfig) TokenSource(tk *oauth2.Token) oauth2.TokenSource

TokenSource returns an oauth2.TokenSource using the parameters from pc

Directories

Path Synopsis
Package jwt provides routines for creating authenticating services using a jwt created using a private key.
Package jwt provides routines for creating authenticating services using a jwt created using a private key.
Package oauth2 contains helper routines for 3-legged Oauth2
Package oauth2 contains helper routines for 3-legged Oauth2

Jump to

Keyboard shortcuts

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