Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewForce ¶
func NewForce() (*force.ForceApiInterface, error)
func NewForceKeyStringSecret ¶
func NewForceKeyStringSecret() (*force.ForceApiInterface, error)
func NewOAuthForce ¶
func NewOAuthForce() (*force.ForceApiInterface, error)
Types ¶
type AuthenticationRequest ¶
type AuthenticationResponse ¶
type AuthenticationResponse interface { GetToken() string GetInstanceURL() string GetID() string GetTokenType() string GetIssuedAt() string GetSignature() string }
func Authenticate ¶
func Authenticate(request AuthenticationRequest, privateKey io.ReadCloser, client *http.Client) (AuthenticationResponse, error)
Authenticate will exchange the JWT signed request for access token.
type DeviceClaims ¶
type DeviceClaims struct { Audience string `json:"aud"` // Audience aus dem RegisteredClaims wird standardkonform in ein Array umgewandelt // Salesforce akzeptiert hier jedoch nur Strings jwt.RegisteredClaims }
DeviceClaims represents the needed claims for the server-to-server oauth flow https://help.salesforce.com/s/articleView?id=sf.remoteaccess_oauth_jwt_flow.htm&type=5
type OAuthHandler ¶
type OAuthHandler struct {
// contains filtered or unexported fields
}
OAuthHandler implements the http.Handler interface and shares the token with our code
func (*OAuthHandler) ServeHTTP ¶
func (s *OAuthHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP waits for the user of this application to finish logging in with Salesforce on the site printed by promptUser() and accepts the request from the redirected user. The authentication code is sent as a query parameter.
Click to show internal directories.
Click to hide internal directories.