Skip to content

Commit

Permalink
fix(auth): use expires_in in grant initiation response body (#783)
Browse files Browse the repository at this point in the history
* chore(auth): update OpenAPI specs

* fix(auth): use expires_in in grant initiation response body
  • Loading branch information
wilsonianb authored Nov 23, 2022
1 parent 632bdfb commit 5a19201
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 50 deletions.
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

0 comments on commit 5a19201

Please sign in to comment.