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

Fix grant initiation response body #749

Closed
mkurapov opened this issue Nov 17, 2022 · 2 comments · Fixed by #783
Closed

Fix grant initiation response body #749

mkurapov opened this issue Nov 17, 2022 · 2 comments · Fixed by #783
Assignees

Comments

@mkurapov
Copy link
Contributor

mkurapov commented Nov 17, 2022

Currently, we return expiresIn as part of the grant initiation request:

expiresIn: accessToken.expiresIn

However, open payments API expects snake case expires_in:

https://github.com/interledger/open-payments/blob/0523804eeb21d9b8cd2eb65e4119738a0512a095/openapi/auth-server.yaml#L64

We do have an issue open in the open-payments repo for converting to pascal case: interledger/open-payments#195 (which would solve this issue altogether), but I'm more concerned that the Open API request/response validation we have set up allows this to pass. Is it because of the fact that access_token is optional in the case where an interactive grant gets generated?

@mkurapov
Copy link
Contributor Author

CC @wilsonianb

@wilsonianb
Copy link
Contributor

fwiw, I have an expires_in fix queued up: 9315f07
(I might extract it from that changeset since I'll have the backend importing types from open-payments instead of auth)

I wonder if improving the validation is a matter of adding additionalProperties: false to
https://github.com/interledger/open-payments/blob/0523804eeb21d9b8cd2eb65e4119738a0512a095/openapi/auth-server.yaml#L414

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 a pull request may close this issue.

2 participants