-
Notifications
You must be signed in to change notification settings - Fork 24
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 code verifier as a parameter. #18
Merged
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
c756bcf
Added code verifier as a parameter.
mooreds 7a2b774
Revert "Added code verifier as a parameter."
mooreds 6c23f4c
Added code verifier as a parameter.
mooreds e0dc757
Tweaked the comment on the code_verifier parameter.
mooreds 11a068e
Merge branch 'master' into add-code-verifier-parameter
mooreds ea09c68
Feedback from Daniel.
mooreds 309f7ec
Improve comments.
mooreds File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
64 changes: 64 additions & 0 deletions
64
src/main/api/exchangeOAuthCodeForAccessTokenUsingPKCE.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
{ | ||
"uri": "/oauth2/token", | ||
"comments": [ | ||
"Exchanges an OAuth authorization code for an access token.", | ||
"If using the Authorization Code grant, you will make a request to the Token endpoint to exchange the authorization code returned from the Authorize endpoint and a code_verifier for an access token." | ||
], | ||
"method": "post", | ||
"methodName": "exchangeOAuthCodeForAccessTokenUsingPKCE", | ||
"successResponse": "AccessToken", | ||
"errorResponse": "OAuthError", | ||
"anonymous": true, | ||
"params": [ | ||
{ | ||
"name": "code", | ||
"comments": [ | ||
"The authorization code returned on the /oauth2/authorize response." | ||
], | ||
"type": "form", | ||
"javaType": "String" | ||
}, | ||
{ | ||
"name": "client_id", | ||
"comments": [ | ||
"(Optional) The unique client identifier. The client Id is the Id of the FusionAuth Application in which you you are attempting to authenticate. This parameter is optional when the Authorization header is provided." | ||
], | ||
"type": "form", | ||
"javaType": "String" | ||
}, | ||
{ | ||
"name": "client_secret", | ||
"comments": [ | ||
"(Optional) The client secret. This value may optionally be provided in the request body instead of the Authorization header." | ||
], | ||
"type": "form", | ||
"javaType": "String" | ||
}, | ||
{ | ||
"name": "grant_type", | ||
"comments": [ | ||
"The grant type to be used. This value must be set to authorization_code" | ||
], | ||
"type": "form", | ||
"javaType": "String", | ||
"constant": true, | ||
"value": "authorization_code" | ||
}, | ||
{ | ||
"name": "redirect_uri", | ||
"comments": [ | ||
"The URI to redirect to upon a successful request." | ||
], | ||
"type": "form", | ||
"javaType": "String" | ||
}, | ||
{ | ||
"name": "code_verifier", | ||
"comments": [ | ||
"The random string generated previously. Will be compared with the code_challenge sent previously, which allows the OAuth provider to authenticate your app." | ||
], | ||
"type": "form", | ||
"javaType": "String" | ||
} | ||
] | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was already here, but perhaps should be re-written, not sure what it means. We are using the authorization code grant, otherwise we wouldn't be using this method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or if you want to leave that is fine - I can re-word some of this stuff later, I don't want to hold you up too long fixing my technical debt. :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. Was trying to keep this in line with the other
exchange
method, defined inexchangeOAuthCodeForAccessToken.json
but will rewrite both to make it clearer.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries, wasn't hard to change the verbiage a bit.