auth

package
v0.1.27 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Credentials

type Credentials struct {
	Token        string `json:"access_token"`
	TokenType    string `json:"token_type"`
	RefreshToken string `json:"refresh_token"`
	InstanceURL  string `json:"instance_url"`
	ID           string `json:"id"`
	Signature    string `json:"signature"`
	Scope        string `json:"scope"`
	IDToken      string `json:"id_token"`
	CommunityURL string `json:"sfdc_community_url"`
	CommunityID  string `json:"sfdc_community_id"`
}

Credentials returned from Salesforce Auth.

type JWTAuthenticator

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

JWTAuthenticator is the JWT OAuth implementation. See: https://help.salesforce.com/articleView?id=remoteaccess_oauth_jwt_flow.htm

func NewJWTAuthenticator

func NewJWTAuthenticator(certKey, clientID, user, server string, client *http.Client, logger *zap.SugaredLogger) (*JWTAuthenticator, error)

NewJWTAuthenticator creates an OAuth JWT authenticator for Salesforce.

func (*JWTAuthenticator) CreateOrRenewCredentials

func (j *JWTAuthenticator) CreateOrRenewCredentials() (*Credentials, error)

CreateOrRenewCredentials will always create a new set of credentials.

func (*JWTAuthenticator) NewCredentials

func (j *JWTAuthenticator) NewCredentials() (*Credentials, error)

NewCredentials generates a new set of credentials.

func (*JWTAuthenticator) RefreshCredentials

func (j *JWTAuthenticator) RefreshCredentials() (*Credentials, error)

RefreshCredentials renews credentials.

Jump to

Keyboard shortcuts

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