Fix #38/#67: add errors field to responses; make client_secret optional#75
Open
ZLeventer wants to merge 1 commit intolinkedin-developers:mainfrom
Open
Fix #38/#67: add errors field to responses; make client_secret optional#75ZLeventer wants to merge 1 commit intolinkedin-developers:mainfrom
ZLeventer wants to merge 1 commit intolinkedin-developers:mainfrom
Conversation
…ients in refresh token flow Per RFC 6749 §2.1 and §6, public clients (without a client_secret) must be able to exchange a refresh token. Only include client_secret in the token request body when it is present.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Two related improvements to client correctness:
Fix #38 — Add errors field to response classes: BaseRestliResponse now exposes an optional errors field populated from the top-level errors key in the API response JSON. GetResponse passes errors through to the base class.
Fix #67 — Make client_secret optional in refresh token flow: Per RFC 6749 §2.1 and §6, public clients must be able to exchange a refresh token without a client secret. Changed AuthClient.init to accept client_secret: Optional[str] = None, and exchange_refresh_token_for_access_token only includes client_secret in the request body when present.
Tests: 51/51 pass.