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

Added information about auth code exchange to oauth2 docs #392

Merged
merged 3 commits into from
Mar 14, 2017

Conversation

therebelrobot
Copy link
Contributor

@therebelrobot therebelrobot commented Mar 9, 2017

There wasn't any information about the auth code exchange, nor the required headers for that call. I've added this to the flow steps already present.

Not sure if this is the appropriate location for it, lemme know if I need to move this to another document.

context: #385 (comment)

There wasn't any information about the auth code exchange, nor the required headers for that call. I've added this to the flow steps already present.

Not sure if this is the appropriate location for it, lemme know if I need to move this to another document.
[API Docs](http://docs.hdyra.apiary.io/#reference/oauth2/oauth2-token-introspection).
Copy link
Contributor Author

Choose a reason for hiding this comment

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

not sure why this line is listed as a change... I made this update in the Github UI if that helps at all.

Copy link
Member

Choose a reason for hiding this comment

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

Maybe due to newline

@aeneasr
Copy link
Member

aeneasr commented Mar 10, 2017

Thanks, looks pretty solid. I'll take a closer look next week!

Copy link
Member

@aeneasr aeneasr left a comment

Choose a reason for hiding this comment

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

Thanks for this! I added a few comments :)

docs/oauth2.md Outdated
POST https://hydra.myapp.com/oauth2/token
Authorization: Basic BASE64_ID_SECRET_PAIR
Content-Type: application/x-www-form-urlencoded
client_id=CLIENT_ID&client_secret=CLIENT_SECRET&code=aaabbbcccddd&redirect_uri=https://example.com/callback&grant_type=authorization_code
Copy link
Member

Choose a reason for hiding this comment

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

You don't need to include client id and client secret in the POST body, it is enough when provided via basic auth :)

docs/oauth2.md Outdated
client_id=CLIENT_ID&client_secret=CLIENT_SECRET&code=aaabbbcccddd&redirect_uri=https://example.com/callback&grant_type=authorization_code
```

*Note:* if your *client* application needs to exchange a refresh token for a new access token, this request should alter the `grant_type` and `code` parameters:
Copy link
Member

Choose a reason for hiding this comment

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

Maybe make it clear that this is a separate thing? Because you can't use the auth code, only a refresh token. Maybe as a new bullet point?

docs/oauth2.md Outdated
POST https://hydra.myapp.com/oauth2/token
Authorization: Basic BASE64_ID_SECRET_PAIR
Content-Type: application/x-www-form-urlencoded
client_id=CLIENT_ID&client_secret=CLIENT_SECRET&refresh_token=REFRESH_TOKEN&redirect_uri=https://example.com/callback&grant_type=refresh_token
Copy link
Member

Choose a reason for hiding this comment

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

Same as above, client_id/secret are only required in the authorization header :)

@therebelrobot
Copy link
Contributor Author

Hey @arekkas! I'll get those changes in today and update this PR once ready.

@therebelrobot
Copy link
Contributor Author

@arekkas I updated the PR, should be good for another pass.

@aeneasr
Copy link
Member

aeneasr commented Mar 14, 2017

Thank you for your contribution!

@aeneasr aeneasr merged commit 26a1284 into ory:master Mar 14, 2017
@therebelrobot therebelrobot deleted the docs/auth-code-exchange branch March 14, 2017 16:58
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