Skip to content

Fix #38/#67: add errors field to responses; make client_secret optional#75

Open
ZLeventer wants to merge 1 commit intolinkedin-developers:mainfrom
ZLeventer:feat/response-errors-field
Open

Fix #38/#67: add errors field to responses; make client_secret optional#75
ZLeventer wants to merge 1 commit intolinkedin-developers:mainfrom
ZLeventer:feat/response-errors-field

Conversation

@ZLeventer
Copy link
Copy Markdown

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.

…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.
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.

AuthClient should not require client secret to use a refresh token Add an errors field with error details to all response classes

1 participant