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(auth): use expires_in in grant initiation response body #783

Merged
merged 2 commits into from
Nov 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/auth/scripts/get-op-schema.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ while [ -L "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symli
done
OUTDIR=$( cd -P "$( dirname "$SOURCE" )/../src/openapi" >/dev/null 2>&1 && pwd )

curl -o "$OUTDIR/schemas.yaml" https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml
curl -o "$OUTDIR/auth-server.yaml" https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/auth-server.yaml
curl -o "$OUTDIR/schemas.yaml" https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml
curl -o "$OUTDIR/auth-server.yaml" https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/auth-server.yaml
4 changes: 2 additions & 2 deletions packages/auth/src/grant/routes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ describe('Grant Routes', (): void => {
value: expect.any(String),
manage: expect.any(String),
access: body.access_token.access,
expiresIn: 600
expires_in: 600
},
continue: {
access_token: {
Expand Down Expand Up @@ -865,7 +865,7 @@ describe('Grant Routes', (): void => {
type: 'incoming-payment'
}
]),
expiresIn: 600
expires_in: 600
},
continue: {
access_token: {
Expand Down
2 changes: 1 addition & 1 deletion packages/auth/src/grant/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ function createGrantBody({
value: accessToken.value,
manage: domain + `/token/${accessToken.managementId}`,
access: access.map((a: Access) => accessToBody(a)),
expiresIn: accessToken.expiresIn
expires_in: accessToken.expiresIn
},
continue: {
access_token: {
Expand Down
4 changes: 2 additions & 2 deletions packages/open-payments/src/config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export default {
OPEN_PAYMENTS_RS_OPEN_API_URL:
'https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/resource-server.yaml',
'https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/resource-server.yaml',
OPEN_PAYMENTS_AS_OPEN_API_URL:
'https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/auth-server.yaml',
'https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/auth-server.yaml',
DEFAULT_REQUEST_TIMEOUT_MS: 5_000
}
28 changes: 14 additions & 14 deletions packages/open-payments/src/generated/auth-server-types.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading