-
Notifications
You must be signed in to change notification settings - Fork 30
(CDAP-17611) Added OAuth function support #61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
dd4e48d to
ce33c0f
Compare
| OAuthInfo oAuthInfo = config.getOAuthInfo(); | ||
| if (oAuthInfo != null) { | ||
| configBuilder.put(SalesforceConstants.CONFIG_OAUTH_TOKEN, oAuthInfo.getAccessToken()); | ||
| configBuilder.put(SalesforceConstants.CONFIG_OAUTH_INSTANCE_URL, oAuthInfo.getInstanceURL()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: use same style (chained or not of builder calls in both if and else
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
ce33c0f to
b5c8108
Compare
supriyapatil-google
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
| @Description("OAuth information for connecting to Salesforce. " + | ||
| "It is expected to be an json string containing two properties, \"accessToken\" and \"instanceURL\", " + | ||
| "which carry the OAuth access token and the URL to connect to respectively. " + | ||
| "Use the ${oauth(provider, credentialId)} macro function for getting acquiring OAuth information dynamically. ") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove getting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
| /** | ||
| * Class to carry OAuth information returned by the {@code ${oauth}} macro function. | ||
| */ | ||
| public class OAuthInfo { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
final
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed
| .put(SalesforceConstants.CONFIG_CONSUMER_KEY, config.getConsumerKey()) | ||
| .put(SalesforceConstants.CONFIG_CONSUMER_SECRET, config.getConsumerSecret()) | ||
| .put(SalesforceConstants.CONFIG_LOGIN_URL, config.getLoginUrl()) | ||
| .put(SalesforceSinkConstants.CONFIG_SOBJECT, config.getSObject()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SUBJECT
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think SOJBECT stands for the Salesforce object.
b5c8108 to
7cf36f9
Compare
7cf36f9 to
7769c1e
Compare
No description provided.