Skip to content
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

replace derived properties with getters #1342

Merged
merged 1 commit into from
Oct 17, 2024

Conversation

ashitsalesforce
Copy link
Contributor

derived properties get saved in config.properties file and clutter. Also, if a user sets their values in config.properties, they are ignored. Avoid derived properties by replacing them with getter methods instead. Following derived properties are eliminated in this PR:

  • PROP_OAUTH_SERVER - sfdc.oauth.server
  • PROP_OAUTH_CLIENTSECRET - sfdc.oauth.clientsecret
  • PROP_OAUTH_CLIENTID - sfdc.oauth.clientid
  • PROP_OAUTH_REDIRECTURI - sfdc.oauth.redirecturi
  • OAUTH_PREFIX + PROD_ENVIRONMENT_VAL + "." + OAUTH_PARTIAL_SERVER - sfdc.oauth.production.server
  • OAUTH_PREFIX + SB_ENVIRONMENT_VAL + "." + OAUTH_PARTIAL_SERVER - sfdc.oauth.sandbox.server
  • OAUTH_PREFIX + PROD_ENVIRONMENT_VAL + "." + OAUTH_PARTIAL_REDIRECTURI - sfdc.oauth.production.redirecturi
  • OAUTH_PREFIX + SB_ENVIRONMENT_VAL + "." + OAUTH_PARTIAL_REDIRECTURI - sfdc.oauth.sandbox.redirecturi

Do not store or publish following properties:

  • PROP_OAUTH_ACCESSTOKEN - sfdc.oauth.accesstoken
  • PROP_OAUTH_REFRESHTOKEN - sfdc.oauth.refreshtoken
  • PROP_OAUTH_INSTANCE_URL - sfdc.oauth.instanceurl

derived properties get saved in config.properties file and clutter. Also, if a user sets their values in config.properties, they are ignored. Avoid derived properties by replacing them with getter methods instead. Following derived properties are eliminated in this PR:
- PROP_OAUTH_SERVER - sfdc.oauth.server
- PROP_OAUTH_CLIENTSECRET - sfdc.oauth.clientsecret
- PROP_OAUTH_CLIENTID - sfdc.oauth.clientid
- PROP_OAUTH_REDIRECTURI - sfdc.oauth.redirecturi
- OAUTH_PREFIX + PROD_ENVIRONMENT_VAL + "." + OAUTH_PARTIAL_SERVER - sfdc.oauth.production.server
- OAUTH_PREFIX + SB_ENVIRONMENT_VAL + "." + OAUTH_PARTIAL_SERVER - sfdc.oauth.sandbox.server
- OAUTH_PREFIX + PROD_ENVIRONMENT_VAL + "." + OAUTH_PARTIAL_REDIRECTURI - sfdc.oauth.production.redirecturi
- OAUTH_PREFIX + SB_ENVIRONMENT_VAL + "." + OAUTH_PARTIAL_REDIRECTURI - sfdc.oauth.sandbox.redirecturi

Do not store or publish following properties:
- PROP_OAUTH_ACCESSTOKEN - sfdc.oauth.accesstoken
- PROP_OAUTH_REFRESHTOKEN - sfdc.oauth.refreshtoken
- PROP_OAUTH_INSTANCE_URL - sfdc.oauth.instanceurl
@ashitsalesforce ashitsalesforce merged commit 66dc374 into forcedotcom:master Oct 17, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant