-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[AGENT-12890] Handle unexpected values for expires_in
in OAuth Access response
#19371
Conversation
Correct me if I'm wrong but if a string is returned for the expires_in field, this will still cause a problem. The only difference now is that an exception will be thrown instead, but it still means that this integration won't work if the oauth endpoint that we are calling returns a number like "expires_in": "3599" instead of "expires_in": 3599 |
Hello @dalsania1, In the current implementation, if the expires_in value is a string, a TypeError will occur during the addition. The modified unit test ensures that an error is not thrown in the case of a string. Some logic could be added to handle numeric string values however, thank you for bringing that up! |
3614393
to
24375ba
Compare
24375ba
to
d765c9e
Compare
What does this PR do?
Allow for an empty
expires_in
field in OAuth Access Token response as detailed by RFC 6749.Handle unexpected type in
expires_in
field, e.g. string.Motivation
Review checklist (to be filled by reviewers)
qa/skip-qa
label if the PR doesn't need to be tested during QA.backport/<branch-name>
label to the PR and it will automatically open a backport PR once this one is merged