Skip to content

Conversation

@kadikraman
Copy link
Contributor

Fixes #30

This will enable passing additional parameters to the auth server in the auth request.
They will be passed into the auth object in JavaScript

e.g.

const appAuth = new AppAuth({
  issuer: '<YOUR_ISSUER_URL>',
  clientId: '<YOUR_CLIENT_ID>',
  redirectUrl: '<YOUR_REDIRECT_URL>',
  additionalParameters: { hello: 'world' },
});
  • implement additionalParameters on iOS
  • implement additionalParameters on Android
  • add documentation for the config object

@kadikraman kadikraman force-pushed the feature/additional-parameters branch from ed523f2 to bf114ea Compare February 8, 2018 16:14
README.md Outdated
- **issuer**: (`string`) *REQUIRED* the url of the auth server
- **clientId**: (`string`) *REQUIRED* your client id on the auth server
- **redirectUrl**: (`string`) *REQUIRED* the url that links back to your app with the auth code
- **additionalParameters**: (`object` | `null`) additional parameters that will be passed in the authorization request
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be helpful to document how these additional parameters are passed in the request or is that obvious to anyone who is using this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. Essentially

{ hello: 'world` }

would be sent as

<url-and-other-params>&hello=world

But I'll make it more explicit in the docs.


ReadableMapKeySetIterator iterator = additionalParameters.keySetIterator();

if (iterator.hasNextKey()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Lol

Copy link
Contributor

@jevakallio jevakallio left a comment

Choose a reason for hiding this comment

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

Looks good! Only thing that needs changing is walking through the entire parameter keyset.

Copy link
Contributor

@jevakallio jevakallio left a comment

Choose a reason for hiding this comment

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

LGTM :shipit:

@kadikraman kadikraman merged commit 906a4e8 into master Feb 8, 2018
@kadikraman kadikraman deleted the feature/additional-parameters branch February 8, 2018 17:42
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.

3 participants