0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

feat: add default resource

This commit is contained in:
Gao Sun 2021-07-24 23:59:35 +08:00
parent 6031b8a683
commit 405513c977
No known key found for this signature in database
GPG key ID: 0F0EFA2E36639F31
3 changed files with 13 additions and 5 deletions

View file

@ -45,7 +45,7 @@
"@types/koa-router": "^7.4.2",
"@types/lodash.pick": "^4.4.6",
"@types/node": "^16.3.1",
"@types/oidc-provider": "^7.4.0",
"@types/oidc-provider": "^7.4.1",
"eslint": "^7.30.0",
"eslint-formatter-pretty": "^4.1.0",
"husky": "^6.0.0",

View file

@ -38,6 +38,14 @@ export default async function initOidc(app: Koa): Promise<Provider> {
revocation: { enabled: true },
introspection: { enabled: true },
devInteractions: { enabled: false },
resourceIndicators: {
// Type def for this is broken.
// Update when we return client-based default resource
defaultResource: () => ['https://api.logto.io'],
getResourceServerInfo: () => {
return { scope: 'api', accessTokenFormat: 'jwt' };
},
},
},
interactions: {
url: (_, interaction) => {

View file

@ -684,10 +684,10 @@
resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e"
integrity sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==
"@types/oidc-provider@^7.4.0":
version "7.4.0"
resolved "https://registry.yarnpkg.com/@types/oidc-provider/-/oidc-provider-7.4.0.tgz#58aae2fe5ac56b1a59f94a15f38e411a868120ca"
integrity sha512-R8EKOSXIVKjWEOlXpkdppRxo6KwQNu+mBwc3cbGynXVlFmyl1SlRQhdg6EiK9clJN0/VyAOskM+r8doZGY+WLg==
"@types/oidc-provider@^7.4.1":
version "7.4.1"
resolved "https://registry.yarnpkg.com/@types/oidc-provider/-/oidc-provider-7.4.1.tgz#885018d7cfcdb791069302d82b090441ac508dd1"
integrity sha512-HGT7NTgg9uQpTffStTz6fg6ig5aO0anzBlui925VGvS+3VDsg2hrJnA86dB9aoOxW3owNJ4s7BHj1ISZVpPR/Q==
dependencies:
"@types/koa" "*"