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

clarify expires_in is a JSON number #172

Merged
merged 1 commit into from Apr 26, 2024
Merged

Conversation

panva
Copy link
Member

@panva panva commented Apr 8, 2024

This small PR attempts to clarify an unfortunately not that rare mistake of server implementations where they respond with a JSON string and not the expected JSON number.

In between the client implementations I maintain I get a PRs/issues at least twice a year which ask that the clients attempt to normalize the Token Endpoint response expires_in value instead of expecting it to be a number.

@MozharAlhosni
Copy link
Contributor

MozharAlhosni commented Apr 14, 2024

Just curious, won't this necessities adding the type for all other parameters? Because a few sentences after the proposed edit, the specification states:

Parameter names and string values are included as JSON strings. Numerical values are included as JSON numbers.

@panva
Copy link
Member Author

panva commented Apr 14, 2024

Just curious, won't this necessities adding the type for all other parameters?

It might. In the past this awkward definition in a follow up paragraph might've been seen as necessary because the same response parameters and their descriptions were used for the implicit grant response which does not have any data types associated given it's part of the url fragment. With that portion of the spec gone we might as well put the JSON data type in the descriptions for all token response parameters.

@aaronpk aaronpk merged commit 33141ce into oauth-wg:main Apr 26, 2024
1 check passed
@panva panva deleted the expires_in_json branch April 26, 2024 16:29
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.

None yet

3 participants