go-sfdc: github.com/g8rswimmer/go-sfdc/credentials Index | Files

package credentials

import "github.com/g8rswimmer/go-sfdc/credentials"

Index

Package Files

credentials.go password.go

type Credentials Uses

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

Credentials is the structure that contains all of the information for creating a session.

func NewCredentials Uses

func NewCredentials(provider Provider) (*Credentials, error)

NewCredentials will create a credential with the custom provider.

func NewPasswordCredentials Uses

func NewPasswordCredentials(creds PasswordCredentials) (*Credentials, error)

NewPasswordCredentials will create a crendential with the password credentials.

func (*Credentials) Retrieve Uses

func (creds *Credentials) Retrieve() (io.Reader, error)

Retrieve will return the reader for the HTTP request body.

func (*Credentials) URL Uses

func (creds *Credentials) URL() string

URL is the URL base for the session endpoint.

type PasswordCredentials Uses

type PasswordCredentials struct {
    URL          string
    Username     string
    Password     string
    ClientID     string
    ClientSecret string
}

PasswordCredentials is a structure for the OAuth credentials that are needed to authenticate with a Salesforce org.

URL is the login URL used, examples would be https://test.salesforce.com or https://login.salesforce.com

Username is the Salesforce user name for logging into the org.

Password is the Salesforce password for the user.

ClientID is the client ID from the connected application.

ClientSecret is the client secret from the connected application.

type Provider Uses

type Provider interface {
    Retrieve() (io.Reader, error)
    URL() string
}

Provider is the interface that is able to provide the session creator with all of the valid information.

Retrieve will return the reader for the HTTP request body.

URL is the URL base for the session endpoint.

Package credentials imports 4 packages (graph) and is imported by 2 packages. Updated 2019-09-08. Refresh now. Tools for package owners.