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(ctx context.Context) (*Credentials, error)
CreateOrRenewCredentials will always create a new set of credentials.
func (*JWTAuthenticator) NewCredentials ¶
func (j *JWTAuthenticator) NewCredentials(ctx context.Context) (*Credentials, error)
NewCredentials generates a new set of credentials.
func (*JWTAuthenticator) RefreshCredentials ¶
func (j *JWTAuthenticator) RefreshCredentials() (*Credentials, error)
RefreshCredentials renews credentials.
Click to show internal directories.
Click to hide internal directories.