Skip to content

Add .ionapi file loader for JavaWebClientOAuth2 sample - #22

Open
piyush15102003 wants to merge 1 commit into
infor-cloud:masterfrom
piyush15102003:fix/ionapi-file-loader
Open

piyush15102003 wants to merge 1 commit into
infor-cloud:masterfrom
piyush15102003:fix/ionapi-file-loader

Conversation

@piyush15102003

Copy link
Copy Markdown

Closes #13

Closes infor-cloud#13: OAuth2ClientConfig previously required client id/secret/endpoints
to be hardcoded as source constants or entries in ifsceoauth.properties -
error prone, and puts credentials in source code, per the issue.

Adds IonApiFileLoader/IonApiCredentials to parse the standard .ionapi JSON
credentials file Infor issues per tenant (ti, cn, ci, cs, iu, pu, saak, sask)
and populate OAuth2ClientConfig from it, deriving the authorization/token/
revocation endpoints from `pu` using this sample's existing endpoint-suffix
convention. Wired into OAuth2ClientConfig.InitProperties() via an opt-in
IONAPI_FILE_PATH system property/env var, falling back to the existing
properties-file behavior when unset so nothing breaks for current users.
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.

Suggestion: Add code load an .ionapi file and populate properties

1 participant