Skip to content

Conversation

@sntran
Copy link
Contributor

@sntran sntran commented Mar 18, 2015

Instead of setting authentication configuration per service in the
config.json, SPAS can now take an object specified in bundle's
auth.provider besides string name.

For oauth2, the configuration object's keys are:

  • baseSite
  • authorizePath
  • accessTokenPath
  • client_id
  • client_secret

Instead of setting authentication configuration per service in the
`config.json`, SPAS can now take an object specified in bundle's
`auth.provider` besides string name.

For oauth2, the configuration object's keys are:
* `baseSite`
* `authorizePath`
* `accessTokenPath`
* `client_id`
* `client_secret`
lib/oauth2.js Outdated
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only significant change (same as line 72), the rest are just re-indentation.

@dtex
Copy link
Owner

dtex commented Mar 18, 2015

I think this style is hard to read. Also we can use built in Javascript methods by testing the other way. negating the need for _ here.

if (typeof oaData === "String") {
  oaData = GLOBAL.config.authentication[oaData];
}

@sntran
Copy link
Contributor Author

sntran commented Mar 19, 2015

I have made adjustments per your comment. Also updated oauth.js.

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.

2 participants