@owlmeans/server-oidc-rp 0.1.18-rc.2 → 0.1.18-rc.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -15
- package/agent-meta/manifest.json +2 -2
- package/agent-meta/skills/server-oidc-rp/SKILL.md +159 -50
- package/build/actions/init.js +2 -2
- package/build/actions/init.js.map +1 -1
- package/build/actions/process.d.ts.map +1 -1
- package/build/actions/process.js +5 -3
- package/build/actions/process.js.map +1 -1
- package/build/auth/plugins/google-client.js +2 -2
- package/build/auth/plugins/google-client.js.map +1 -1
- package/build/auth/plugins/oidc-client.js +3 -3
- package/build/auth/plugins/oidc-client.js.map +1 -1
- package/build/entrypoints.d.ts +3 -0
- package/build/entrypoints.d.ts.map +1 -0
- package/build/entrypoints.js +10 -0
- package/build/entrypoints.js.map +1 -0
- package/build/guard.d.ts +6 -2
- package/build/guard.d.ts.map +1 -1
- package/build/guard.js +7 -7
- package/build/guard.js.map +1 -1
- package/build/index.d.ts +1 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -1
- package/build/index.js.map +1 -1
- package/build/model/gate.js +6 -6
- package/build/model/gate.js.map +1 -1
- package/build/utils/auth.js +1 -1
- package/build/wrapper.d.ts.map +1 -1
- package/build/wrapper.js +20 -5
- package/build/wrapper.js.map +1 -1
- package/package.json +18 -18
- package/src/actions/init.ts +2 -2
- package/src/actions/process.ts +5 -12
- package/src/auth/plugins/google-client.ts +2 -2
- package/src/auth/plugins/oidc-client.ts +3 -3
- package/src/entrypoints.ts +24 -0
- package/src/guard.ts +8 -11
- package/src/index.ts +1 -1
- package/src/model/gate.ts +6 -6
- package/src/utils/auth.ts +1 -1
- package/src/wrapper.ts +21 -5
- package/tests/context.ts +1 -2
- package/build/modules.d.ts +0 -3
- package/build/modules.d.ts.map +0 -1
- package/build/modules.js +0 -12
- package/build/modules.js.map +0 -1
- package/src/modules.ts +0 -30
package/build/guard.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { appendOidcGuard as appendBasicOidcGuard,
|
|
2
|
-
import {
|
|
1
|
+
import { appendOidcGuard as appendBasicOidcGuard, oidcProtocols, } from '@owlmeans/oidc';
|
|
2
|
+
import { bind } from '@owlmeans/server-entrypoint';
|
|
3
3
|
import * as actions from './actions/index.js';
|
|
4
4
|
export const appendOidcGuard = (context, opts) => {
|
|
5
5
|
const ctx = appendBasicOidcGuard(context, opts);
|
|
6
6
|
return ctx;
|
|
7
7
|
};
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
/** Server-local OIDC handlers for the shared OIDC protocol pair. */
|
|
9
|
+
export const oidcEntrypoints = [
|
|
10
|
+
bind(oidcProtocols.init, actions.init),
|
|
11
|
+
bind(oidcProtocols.authenticate, actions.authenticate),
|
|
12
|
+
];
|
|
13
13
|
//# sourceMappingURL=guard.js.map
|
package/build/guard.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guard.js","sourceRoot":"","sources":["../src/guard.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"guard.js","sourceRoot":"","sources":["../src/guard.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,eAAe,IAAI,oBAAoB,EACvC,aAAa,GACd,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAA;AAClD,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAA;AAE7C,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,OAAU,EAAE,IAAuB,EACnC,EAAE;IACF,MAAM,GAAG,GAAG,oBAAoB,CAAO,OAAO,EAAE,IAAI,CAAC,CAAA;IAErD,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA;AAED,oEAAoE;AACpE,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC;IACtC,IAAI,CAAC,aAAa,CAAC,YAAY,EAAE,OAAO,CAAC,YAAY,CAAC;CACvD,CAAA"}
|
package/build/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export * from './consts.js';
|
|
|
3
3
|
export * from './service.js';
|
|
4
4
|
export * from './guard.js';
|
|
5
5
|
export * from './gate.js';
|
|
6
|
-
export * from './
|
|
6
|
+
export * from './entrypoints.js';
|
|
7
7
|
export * from './wrapper.js';
|
|
8
8
|
export { createGateModel } from './model/gate.js';
|
|
9
9
|
export { extractPermissionSets } from './utils/permissions.js';
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EACV,oBAAoB,EACpB,YAAY,EACZ,sBAAsB,EACtB,eAAe,EACf,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,EACZ,MAAM,EACN,OAAO,EACP,qBAAqB,EACrB,WAAW,EACX,kBAAkB,GACnB,MAAM,YAAY,CAAA;AACnB,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EACV,oBAAoB,EACpB,YAAY,EACZ,sBAAsB,EACtB,eAAe,EACf,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,EACZ,MAAM,EACN,OAAO,EACP,qBAAqB,EACrB,WAAW,EACX,kBAAkB,GACnB,MAAM,YAAY,CAAA;AACnB,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA"}
|
package/build/index.js
CHANGED
|
@@ -2,7 +2,7 @@ export * from './consts.js';
|
|
|
2
2
|
export * from './service.js';
|
|
3
3
|
export * from './guard.js';
|
|
4
4
|
export * from './gate.js';
|
|
5
|
-
export * from './
|
|
5
|
+
export * from './entrypoints.js';
|
|
6
6
|
export * from './wrapper.js';
|
|
7
7
|
export { createGateModel } from './model/gate.js';
|
|
8
8
|
export { extractPermissionSets } from './utils/permissions.js';
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAiBA,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAiBA,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA"}
|
package/build/model/gate.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AuthForbidden, AuthManagerError, AuthManagerUnsupported, AuthUnknown } from '@owlmeans/auth';
|
|
1
|
+
import { AuthForbidden, AuthManagerError, AuthManagerUnsupported, AuthUnknown, entitySlugOf } from '@owlmeans/auth';
|
|
2
2
|
import { authService, DEFAULT_ALIAS } from '../consts.js';
|
|
3
3
|
import { cache, managedId } from '../utils/cache.js';
|
|
4
4
|
import { ResponseMode } from './consts.js';
|
|
@@ -8,15 +8,15 @@ export const createGateModel = (ctx) => {
|
|
|
8
8
|
const oidc = ctx.service(DEFAULT_ALIAS);
|
|
9
9
|
try {
|
|
10
10
|
return await oidc.getClient({
|
|
11
|
-
entityId: user
|
|
12
|
-
clientId: oidc.entityToClientId({ entityId: user
|
|
11
|
+
entityId: entitySlugOf(user),
|
|
12
|
+
clientId: oidc.entityToClientId({ entityId: entitySlugOf(user) })
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
15
|
catch (e) {
|
|
16
16
|
if (e instanceof AuthManagerError) {
|
|
17
|
-
const
|
|
17
|
+
const providers = await ctx.entrypoint(authService.provider.list).call({
|
|
18
18
|
params: { service: ctx.cfg.alias ?? ctx.cfg.service },
|
|
19
|
-
query: { entityId: user
|
|
19
|
+
query: { entityId: entitySlugOf(user) }
|
|
20
20
|
});
|
|
21
21
|
if (providers.length < 1) {
|
|
22
22
|
throw new AuthUnknown();
|
|
@@ -57,7 +57,7 @@ export const createGateModel = (ctx) => {
|
|
|
57
57
|
&& (scope == null || (proof.scopes?.includes(scope) ?? false));
|
|
58
58
|
});
|
|
59
59
|
},
|
|
60
|
-
fixPermissions: (permissions, user) => permissions.map(perm => perm.replaceAll('{entity}', user
|
|
60
|
+
fixPermissions: (permissions, user) => permissions.map(perm => perm.replaceAll('{entity}', entitySlugOf(user) ?? '-')),
|
|
61
61
|
prepareRequest: async (client, request) => {
|
|
62
62
|
let { permission, ..._request } = request;
|
|
63
63
|
const params = new URLSearchParams(_request);
|
package/build/model/gate.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gate.js","sourceRoot":"","sources":["../../src/model/gate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,sB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,GAAG,GAAG,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAA;oBAC/D,IAAI,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC;wBACb,MAAM,CAAC,GAAG,CAAC,IAAI,KAAK,KAAK,EAAE,CAAA;oBAC7B,CAAC;yBAAM,CAAC;wBACN,MAAM,CAAC,IAAI,CAAC,GAAG,QAAQ,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;oBACvD,CAAC;oBACD,OAAO,MAAM,CAAA;gBACf,CAAC,EAAE,EAAc,CAAC;gBAClB,aAAa,EAAE,YAAY,CAAC,WAAW;aACZ,CAAA;YAE7B,OAAO,UAAU,CAAA;QACnB,CAAC;KACF,CAAA;IAED,OAAO,KAAK,CAAA;AACd,CAAC,CAAA"}
|
package/build/utils/auth.js
CHANGED
|
@@ -18,7 +18,7 @@ export const makeOidcAuthentication = (context) => async (credential) => {
|
|
|
18
18
|
throw new AuthenPayloadError('code_challenge');
|
|
19
19
|
}
|
|
20
20
|
console.log("\n\nWe are picking verifier by id: ", verifierId(challenge));
|
|
21
|
-
const verification = await cache(context).
|
|
21
|
+
const verification = await cache(context).take(verifierId(challenge));
|
|
22
22
|
console.log("Verification we get: ", verification, "\n\n");
|
|
23
23
|
if (verification.verifier == null) {
|
|
24
24
|
throw new AuthenFailed();
|
package/build/wrapper.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wrapper.d.ts","sourceRoot":"","sources":["../src/wrapper.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAyC,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAc/F,eAAO,MAAM,uBAAuB,QAAO,
|
|
1
|
+
{"version":3,"file":"wrapper.d.ts","sourceRoot":"","sources":["../src/wrapper.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAyC,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAc/F,eAAO,MAAM,uBAAuB,QAAO,kBAqI1C,CAAA"}
|
package/build/wrapper.js
CHANGED
|
@@ -33,7 +33,7 @@ export const makeOidcWrappingService = () => {
|
|
|
33
33
|
}
|
|
34
34
|
record.validated = new Date();
|
|
35
35
|
if (ctx.hasEntrypoint(authService.auth.update)) {
|
|
36
|
-
const
|
|
36
|
+
const update = await ctx.entrypoint(authService.auth.update)
|
|
37
37
|
.call({ body: { token, tokenSet: record.payload } });
|
|
38
38
|
const updateEnvelope = makeEnvelopeModel(update.token, EnvelopeKind.Token);
|
|
39
39
|
const authManager = await trust(ctx, TRUSTED, AUTH_SRV_KEY);
|
|
@@ -46,11 +46,11 @@ export const makeOidcWrappingService = () => {
|
|
|
46
46
|
role: updatedAuth.role ?? AuthRole.Guest,
|
|
47
47
|
userId: updatedAuth.userId ?? user.userId,
|
|
48
48
|
profileId: updatedAuth.profileId,
|
|
49
|
-
|
|
49
|
+
entitySlug: updatedAuth.entitySlug ?? user.entitySlug,
|
|
50
50
|
createdAt: new Date()
|
|
51
51
|
};
|
|
52
52
|
if (updatedAuth.challenge !== user.token) {
|
|
53
|
-
await cache(ctx).delete(
|
|
53
|
+
await cache(ctx).delete(managedId(user.token));
|
|
54
54
|
updatedUser.token = updatedAuth.challenge;
|
|
55
55
|
record.id = managedId(updatedUser.token);
|
|
56
56
|
}
|
|
@@ -67,10 +67,25 @@ export const makeOidcWrappingService = () => {
|
|
|
67
67
|
if (defaultClientId != null) {
|
|
68
68
|
let tokenSet = record.payload;
|
|
69
69
|
const client = await oidc.getClient(defaultClientId);
|
|
70
|
-
|
|
70
|
+
// Revalidate using only what this session and this provider actually support.
|
|
71
|
+
// `expires_at` is the token set's own absolute expiry; **absent is not expired** —
|
|
72
|
+
// reading a missing value as the epoch (the former `?? 0`) sent every single
|
|
73
|
+
// validation, including one moments after login, down the refresh path. That path
|
|
74
|
+
// cannot work for a session granted without `offline_access`, because such a token
|
|
75
|
+
// set carries no refresh token at all, so a valid login died as a 403.
|
|
76
|
+
const expiresAt = tokenSet.expires_at;
|
|
77
|
+
if (expiresAt != null && days.unix(expiresAt).isBefore()) {
|
|
78
|
+
if (tokenSet.refresh_token == null) {
|
|
79
|
+
// Expired with nothing to renew it — the user has to authenticate again.
|
|
80
|
+
throw new AuthorizationError('access-token');
|
|
81
|
+
}
|
|
71
82
|
tokenSet = await client.refresh(tokenSet);
|
|
72
83
|
}
|
|
73
|
-
else {
|
|
84
|
+
else if (client.getMetadata().introspection_endpoint != null) {
|
|
85
|
+
// Introspection is the only way to notice a revocation that happened before the
|
|
86
|
+
// token's own expiry, so it stays the check of choice — but it is an optional
|
|
87
|
+
// provider feature. Calling an endpoint the discovery document never advertised
|
|
88
|
+
// throws, which would fail the session for the opposite reason to the one above.
|
|
74
89
|
const result = await client.introspect(tokenSet, 'access_token');
|
|
75
90
|
if (!result.active) {
|
|
76
91
|
throw new AuthorizationError('access-token');
|
package/build/wrapper.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wrapper.js","sourceRoot":"","sources":["../src/wrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAE3E,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AACjE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAEnD,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAClG,OAAO,IAAI,MAAM,OAAO,CAAA;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,M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AW,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,YAAY,CAAC,KAAK,CAAC,CAAA;wBAEhE,MAAM,CAAC,OAAO,GAAG,QAAkC,CAAA;wBAEnD,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,GAAG,EAAE,mBAAmB,GAAG,IAAI,EAAE,CAAC,CAAA;wBAElE,OAAO,EAAE,KAAK,EAAE,GAAG,kBAAkB,CAAC,WAAW,EAAE,IAAI,aAAa,EAAE,EAAE,CAAA;oBAC1E,CAAC;gBACH,CAAC;YACH,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAClB,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAA;gBAC9C,IAAI,GAAG,EAAE,CAAC;oBACR,IAAI,GAAG,YAAY,kBAAkB,EAAE,CAAC;wBACtC,MAAM,GAAG,CAAA;oBACX,CAAC;oBACD,MAAM,IAAI,kBAAkB,CAAC,SAAS,CAAC,CAAA;gBACzC,CAAC;YACH,CAAC;YACD,OAAO,IAAI,CAAA;QACb,CAAC;KACF,CAAC,CAAA;IAEF,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@owlmeans/server-oidc-rp",
|
|
3
|
-
"version": "0.1.18-rc.
|
|
3
|
+
"version": "0.1.18-rc.21",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -37,29 +37,29 @@
|
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@owlmeans/dep-config": "workspace:*",
|
|
40
|
-
"@owlmeans/test-auth": "^0.1.18-rc.
|
|
41
|
-
"@types/bun": "^1.
|
|
40
|
+
"@owlmeans/test-auth": "^0.1.18-rc.16",
|
|
41
|
+
"@types/bun": "^1.4.0",
|
|
42
42
|
"@types/node": "^26.1.0",
|
|
43
43
|
"nodemon": "^3.1.14",
|
|
44
44
|
"typescript": "^7.0.2"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@noble/hashes": "^1.5.0",
|
|
48
|
-
"@owlmeans/auth": "^0.1.18-rc.
|
|
49
|
-
"@owlmeans/auth-common": "^0.1.18-rc.
|
|
50
|
-
"@owlmeans/basic-envelope": "^0.1.18-rc.
|
|
51
|
-
"@owlmeans/client-entrypoint": "^0.1.18-rc.
|
|
52
|
-
"@owlmeans/config": "^0.1.18-rc.
|
|
53
|
-
"@owlmeans/context": "^0.1.18-rc.
|
|
54
|
-
"@owlmeans/did": "^0.1.18-rc.
|
|
55
|
-
"@owlmeans/entrypoint": "^0.1.18-rc.
|
|
56
|
-
"@owlmeans/oidc": "^0.1.18-rc.
|
|
57
|
-
"@owlmeans/resource": "^0.1.18-rc.
|
|
58
|
-
"@owlmeans/route": "^0.1.18-rc.
|
|
59
|
-
"@owlmeans/server-api": "^0.1.18-rc.
|
|
60
|
-
"@owlmeans/server-auth": "^0.1.18-rc.
|
|
61
|
-
"@owlmeans/server-context": "^0.1.18-rc.
|
|
62
|
-
"@owlmeans/server-entrypoint": "^0.1.18-rc.
|
|
48
|
+
"@owlmeans/auth": "^0.1.18-rc.12",
|
|
49
|
+
"@owlmeans/auth-common": "^0.1.18-rc.16",
|
|
50
|
+
"@owlmeans/basic-envelope": "^0.1.18-rc.15",
|
|
51
|
+
"@owlmeans/client-entrypoint": "^0.1.18-rc.16",
|
|
52
|
+
"@owlmeans/config": "^0.1.18-rc.15",
|
|
53
|
+
"@owlmeans/context": "^0.1.18-rc.11",
|
|
54
|
+
"@owlmeans/did": "^0.1.18-rc.15",
|
|
55
|
+
"@owlmeans/entrypoint": "^0.1.18-rc.14",
|
|
56
|
+
"@owlmeans/oidc": "^0.1.18-rc.24",
|
|
57
|
+
"@owlmeans/resource": "^0.1.18-rc.12",
|
|
58
|
+
"@owlmeans/route": "^0.1.18-rc.12",
|
|
59
|
+
"@owlmeans/server-api": "^0.1.18-rc.20",
|
|
60
|
+
"@owlmeans/server-auth": "^0.1.18-rc.21",
|
|
61
|
+
"@owlmeans/server-context": "^0.1.18-rc.15",
|
|
62
|
+
"@owlmeans/server-entrypoint": "^0.1.18-rc.14",
|
|
63
63
|
"@scure/base": "^2.3.0",
|
|
64
64
|
"dayjs": "^1.11.13",
|
|
65
65
|
"jose": "6.2.5",
|
package/src/actions/init.ts
CHANGED
|
@@ -45,7 +45,7 @@ export const init: RefedEntrypointHandler = handleBody(async (body: OIDCAuthInit
|
|
|
45
45
|
* @TODO We need to move it to some remote resource.
|
|
46
46
|
* And make oidc service itself use such a resource to get required client.
|
|
47
47
|
*/
|
|
48
|
-
const
|
|
48
|
+
const providers = await context.entrypoint<ClientEntrypoint<OidcProviderDescriptor[]>>(
|
|
49
49
|
authService.provider.list
|
|
50
50
|
).call({
|
|
51
51
|
params: { service: context.cfg.alias ?? context.cfg.service },
|
|
@@ -93,7 +93,7 @@ export const init: RefedEntrypointHandler = handleBody(async (body: OIDCAuthInit
|
|
|
93
93
|
...(entityIdUsedForResolution ? { entityId } : {}),
|
|
94
94
|
}, { ttl: AUTHEN_TIMEFRAME / 1000 })
|
|
95
95
|
|
|
96
|
-
const
|
|
96
|
+
const dispatcherUrl = await context.entrypoint<ClientEntrypoint<string>>(DISPATCHER).url()
|
|
97
97
|
|
|
98
98
|
const cfg = client.getConfig()
|
|
99
99
|
const url = client.makeAuthUrl({
|
package/src/actions/process.ts
CHANGED
|
@@ -59,18 +59,11 @@ export const authenticate: RefedEntrypointHandler = handleBody(async (
|
|
|
59
59
|
|
|
60
60
|
await cache(context).delete(exchangeId(token))
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
62
|
+
// Only the id_token is guaranteed to be a JWT. An access token's format is provider-private —
|
|
63
|
+
// `oidc-provider` issues opaque ones by default — so decoding it throws `JWTInvalid` and, from
|
|
64
|
+
// inside this handler, fails the whole exchange after it has already succeeded. Nothing here
|
|
65
|
+
// needs it either: the permission grant is read from the id_token below.
|
|
67
66
|
const id = decodeJwt(tokenSet.id_token)
|
|
68
|
-
console.log(
|
|
69
|
-
'token set',
|
|
70
|
-
tokenSet,
|
|
71
|
-
tokenSet.claims(),
|
|
72
|
-
id
|
|
73
|
-
)
|
|
74
67
|
|
|
75
68
|
// Integrated IAM mode: the provider mints the subject's PermissionSet[] into the id_token
|
|
76
69
|
const permissions = extractPermissionSets(id[PERMISSIONS_CLAIM])
|
|
@@ -95,7 +88,7 @@ export const authenticate: RefedEntrypointHandler = handleBody(async (
|
|
|
95
88
|
// @TODO Actually this is highly incorrect - we need to get profile details
|
|
96
89
|
// from the OwlMeans Auth intead
|
|
97
90
|
// profileId: user?.userId,
|
|
98
|
-
|
|
91
|
+
entitySlug: cfg.entityId,
|
|
99
92
|
...(permissions != null ? { permissions, permissioned: true } : {}),
|
|
100
93
|
isUser: true,
|
|
101
94
|
createdAt: new Date(),
|
|
@@ -89,7 +89,7 @@ export const googleClientPlugin = <C extends Config, T extends Context<C>>(conte
|
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
// Look up the PKCE verifier using the state parameter
|
|
92
|
-
const verification = await cache<C, T>(context).
|
|
92
|
+
const verification = await cache<C, T>(context).take(verifierId(state))
|
|
93
93
|
if (verification == null || verification.verifier == null) {
|
|
94
94
|
throw new AuthenFailed()
|
|
95
95
|
}
|
|
@@ -179,7 +179,7 @@ export const googleClientPlugin = <C extends Config, T extends Context<C>>(conte
|
|
|
179
179
|
credential.type = GOOGLE_CLIENT_AUTH
|
|
180
180
|
credential.userId = profile.userId
|
|
181
181
|
credential.profileId = profile.profileId
|
|
182
|
-
credential.
|
|
182
|
+
credential.entitySlug = profile.entitySlug
|
|
183
183
|
|
|
184
184
|
return { token: exchangeToken }
|
|
185
185
|
}
|
|
@@ -8,7 +8,7 @@ import type { OidcUserDetails, ProviderProfileDetails } from '@owlmeans/oidc'
|
|
|
8
8
|
import { base64urlnopad as base64 } from '@scure/base'
|
|
9
9
|
import { randomBytes } from '@noble/hashes/utils'
|
|
10
10
|
import { sha256 } from '@noble/hashes/sha256'
|
|
11
|
-
import { ALL_SCOPES, AuthenFailed, AuthenPayloadError, AuthManagerError, AuthRole } from '@owlmeans/auth'
|
|
11
|
+
import { ALL_SCOPES, AuthenFailed, AuthenPayloadError, AuthManagerError, AuthRole, entitySlugOf } from '@owlmeans/auth'
|
|
12
12
|
import { AUTHEN_TIMEFRAME } from '@owlmeans/server-auth'
|
|
13
13
|
import { decodeJwt } from 'jose'
|
|
14
14
|
import { KEY_OWL } from '@owlmeans/did'
|
|
@@ -78,7 +78,7 @@ export const oidcClientPlugin = <C extends Config, T extends Context<C>>(context
|
|
|
78
78
|
|
|
79
79
|
// @TODO Actually think about how to make oidc service configurable
|
|
80
80
|
const oidc = context.service<OidcClientService>(DEFAULT_ALIAS)
|
|
81
|
-
let entityId = request
|
|
81
|
+
let entityId = entitySlugOf(request) ?? oidc.getDefault()
|
|
82
82
|
|
|
83
83
|
if (entityId == null) {
|
|
84
84
|
throw new AuthenPayloadError('client')
|
|
@@ -237,7 +237,7 @@ export const oidcClientPlugin = <C extends Config, T extends Context<C>>(context
|
|
|
237
237
|
credential.type = OIDC_CLIENT_AUTH
|
|
238
238
|
credential.userId = profile.userId
|
|
239
239
|
credential.profileId = profile.profileId
|
|
240
|
-
credential.
|
|
240
|
+
credential.entitySlug = profile.entitySlug
|
|
241
241
|
|
|
242
242
|
return { token: exchangeToken }
|
|
243
243
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { contract, openProtocol, protocol, typed } from '@owlmeans/entrypoint'
|
|
2
|
+
import type { EntrypointProtocolDeclaration } from '@owlmeans/entrypoint'
|
|
3
|
+
import { backend, route, RouteMethod, service } from '@owlmeans/route'
|
|
4
|
+
import { authService } from './consts.js'
|
|
5
|
+
import { GUARD_ED25519 } from '@owlmeans/auth-common'
|
|
6
|
+
import { OIDCTokenUpdateSchema } from '@owlmeans/oidc'
|
|
7
|
+
|
|
8
|
+
export const makeAuthServiceEntrypoints = (
|
|
9
|
+
serviceAlias: string,
|
|
10
|
+
prefix: string = 'oidc-api'
|
|
11
|
+
): EntrypointProtocolDeclaration[] => [
|
|
12
|
+
openProtocol(
|
|
13
|
+
route(authService.provider.list, `/${prefix}/provider/:service`, service(serviceAlias)),
|
|
14
|
+
{ guards: GUARD_ED25519 },
|
|
15
|
+
),
|
|
16
|
+
protocol(
|
|
17
|
+
route(
|
|
18
|
+
authService.auth.update, `/${prefix}/auth/update`,
|
|
19
|
+
backend(service(serviceAlias), RouteMethod.POST),
|
|
20
|
+
),
|
|
21
|
+
contract.request({ body: typed(OIDCTokenUpdateSchema) }, typed<any>()),
|
|
22
|
+
{ guards: GUARD_ED25519 },
|
|
23
|
+
),
|
|
24
|
+
]
|
package/src/guard.ts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import type { OidcGuardOptions } from '@owlmeans/oidc'
|
|
2
2
|
import type { Config, Context } from './types.js'
|
|
3
|
-
import type { CommonEntrypoint } from '@owlmeans/entrypoint'
|
|
4
3
|
import {
|
|
5
|
-
appendOidcGuard as appendBasicOidcGuard,
|
|
6
|
-
|
|
7
|
-
DISPATCHER_OIDC, DISPATCHER_OIDC_INIT
|
|
4
|
+
appendOidcGuard as appendBasicOidcGuard,
|
|
5
|
+
oidcProtocols,
|
|
8
6
|
} from '@owlmeans/oidc'
|
|
9
|
-
import {
|
|
7
|
+
import { bind } from '@owlmeans/server-entrypoint'
|
|
10
8
|
import * as actions from './actions/index.js'
|
|
11
9
|
|
|
12
10
|
export const appendOidcGuard = <C extends Config, T extends Context<C>>(
|
|
@@ -17,9 +15,8 @@ export const appendOidcGuard = <C extends Config, T extends Context<C>>(
|
|
|
17
15
|
return ctx
|
|
18
16
|
}
|
|
19
17
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
18
|
+
/** Server-local OIDC handlers for the shared OIDC protocol pair. */
|
|
19
|
+
export const oidcEntrypoints = [
|
|
20
|
+
bind(oidcProtocols.init, actions.init),
|
|
21
|
+
bind(oidcProtocols.authenticate, actions.authenticate),
|
|
22
|
+
]
|
package/src/index.ts
CHANGED
|
@@ -19,7 +19,7 @@ export * from './consts.js'
|
|
|
19
19
|
export * from './service.js'
|
|
20
20
|
export * from './guard.js'
|
|
21
21
|
export * from './gate.js'
|
|
22
|
-
export * from './
|
|
22
|
+
export * from './entrypoints.js'
|
|
23
23
|
export * from './wrapper.js'
|
|
24
24
|
export { createGateModel } from './model/gate.js'
|
|
25
25
|
export { extractPermissionSets } from './utils/permissions.js'
|
package/src/model/gate.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AuthForbidden, AuthManagerError, AuthManagerUnsupported, AuthUnknown } from '@owlmeans/auth'
|
|
1
|
+
import { AuthForbidden, AuthManagerError, AuthManagerUnsupported, AuthUnknown, entitySlugOf } from '@owlmeans/auth'
|
|
2
2
|
import { authService, DEFAULT_ALIAS } from '../consts.js'
|
|
3
3
|
import type { Config, Context, OidcClientService } from '../types.js'
|
|
4
4
|
import { cache, managedId } from '../utils/cache.js'
|
|
@@ -13,16 +13,16 @@ export const createGateModel = <C extends Config, T extends Context<C>>(ctx: T):
|
|
|
13
13
|
const oidc = ctx.service<OidcClientService>(DEFAULT_ALIAS)
|
|
14
14
|
try {
|
|
15
15
|
return await oidc.getClient({
|
|
16
|
-
entityId: user
|
|
17
|
-
clientId: oidc.entityToClientId({ entityId: user
|
|
16
|
+
entityId: entitySlugOf(user),
|
|
17
|
+
clientId: oidc.entityToClientId({ entityId: entitySlugOf(user) })
|
|
18
18
|
})
|
|
19
19
|
} catch (e) {
|
|
20
20
|
if (e instanceof AuthManagerError) {
|
|
21
|
-
const
|
|
21
|
+
const providers = await ctx.entrypoint<ClientEntrypoint<OidcProviderDescriptor[]>>(
|
|
22
22
|
authService.provider.list
|
|
23
23
|
).call({
|
|
24
24
|
params: { service: ctx.cfg.alias ?? ctx.cfg.service },
|
|
25
|
-
query: { entityId: user
|
|
25
|
+
query: { entityId: entitySlugOf(user) }
|
|
26
26
|
})
|
|
27
27
|
if (providers.length < 1) {
|
|
28
28
|
throw new AuthUnknown()
|
|
@@ -83,7 +83,7 @@ export const createGateModel = <C extends Config, T extends Context<C>>(ctx: T):
|
|
|
83
83
|
},
|
|
84
84
|
|
|
85
85
|
fixPermissions: (permissions, user) => permissions.map(
|
|
86
|
-
perm => perm.replaceAll('{entity}', user
|
|
86
|
+
perm => perm.replaceAll('{entity}', entitySlugOf(user) ?? '-')
|
|
87
87
|
),
|
|
88
88
|
|
|
89
89
|
prepareRequest: async (client, request) => {
|
package/src/utils/auth.ts
CHANGED
|
@@ -24,7 +24,7 @@ export const makeOidcAuthentication = <C extends Config, T extends Context<C>>(c
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
console.log("\n\nWe are picking verifier by id: ", verifierId(challenge))
|
|
27
|
-
const verification = await cache<C, T>(context).
|
|
27
|
+
const verification = await cache<C, T>(context).take(verifierId(challenge))
|
|
28
28
|
console.log("Verification we get: ", verification, "\n\n")
|
|
29
29
|
if (verification.verifier == null) {
|
|
30
30
|
throw new AuthenFailed()
|
package/src/wrapper.ts
CHANGED
|
@@ -42,7 +42,7 @@ export const makeOidcWrappingService = (): WrappedOIDCService => {
|
|
|
42
42
|
record.validated = new Date()
|
|
43
43
|
|
|
44
44
|
if (ctx.hasEntrypoint(authService.auth.update)) {
|
|
45
|
-
const
|
|
45
|
+
const update = await ctx.entrypoint<ClientEntrypoint<OIDCTokenUpdate>>(authService.auth.update)
|
|
46
46
|
.call({ body: { token, tokenSet: record.payload } })
|
|
47
47
|
|
|
48
48
|
const updateEnvelope = makeEnvelopeModel<AuthCredentials>(update.token, EnvelopeKind.Token)
|
|
@@ -58,12 +58,12 @@ export const makeOidcWrappingService = (): WrappedOIDCService => {
|
|
|
58
58
|
role: updatedAuth.role ?? AuthRole.Guest,
|
|
59
59
|
userId: updatedAuth.userId ?? user.userId,
|
|
60
60
|
profileId: updatedAuth.profileId,
|
|
61
|
-
|
|
61
|
+
entitySlug: updatedAuth.entitySlug ?? user.entitySlug,
|
|
62
62
|
createdAt: new Date()
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
if (updatedAuth.challenge !== user.token) {
|
|
66
|
-
await cache(ctx).delete(
|
|
66
|
+
await cache(ctx).delete(managedId(user.token))
|
|
67
67
|
updatedUser.token = updatedAuth.challenge
|
|
68
68
|
record.id = managedId(updatedUser.token)
|
|
69
69
|
}
|
|
@@ -84,9 +84,25 @@ export const makeOidcWrappingService = (): WrappedOIDCService => {
|
|
|
84
84
|
if (defaultClientId != null) {
|
|
85
85
|
let tokenSet: CommonTokenSetParams = record.payload as CommonTokenSetParams
|
|
86
86
|
const client = await oidc.getClient(defaultClientId)
|
|
87
|
-
|
|
87
|
+
|
|
88
|
+
// Revalidate using only what this session and this provider actually support.
|
|
89
|
+
// `expires_at` is the token set's own absolute expiry; **absent is not expired** —
|
|
90
|
+
// reading a missing value as the epoch (the former `?? 0`) sent every single
|
|
91
|
+
// validation, including one moments after login, down the refresh path. That path
|
|
92
|
+
// cannot work for a session granted without `offline_access`, because such a token
|
|
93
|
+
// set carries no refresh token at all, so a valid login died as a 403.
|
|
94
|
+
const expiresAt = tokenSet.expires_at
|
|
95
|
+
if (expiresAt != null && days.unix(expiresAt).isBefore()) {
|
|
96
|
+
if (tokenSet.refresh_token == null) {
|
|
97
|
+
// Expired with nothing to renew it — the user has to authenticate again.
|
|
98
|
+
throw new AuthorizationError('access-token')
|
|
99
|
+
}
|
|
88
100
|
tokenSet = await client.refresh(tokenSet as OidcTokenSetParameters) as CommonTokenSetParams
|
|
89
|
-
} else {
|
|
101
|
+
} else if (client.getMetadata().introspection_endpoint != null) {
|
|
102
|
+
// Introspection is the only way to notice a revocation that happened before the
|
|
103
|
+
// token's own expiry, so it stays the check of choice — but it is an optional
|
|
104
|
+
// provider feature. Calling an endpoint the discovery document never advertised
|
|
105
|
+
// throws, which would fail the session for the opposite reason to the one above.
|
|
90
106
|
const result = await client.introspect(tokenSet as OidcTokenSetParameters, 'access_token')
|
|
91
107
|
if (!result.active) {
|
|
92
108
|
throw new AuthorizationError('access-token')
|
package/tests/context.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AppType,
|
|
1
|
+
import { AppType, makeBasicContext } from '@owlmeans/context'
|
|
2
2
|
import type { BasicConfig, BasicContext } from '@owlmeans/context'
|
|
3
3
|
import { createStaticResource } from '@owlmeans/static-resource'
|
|
4
4
|
import { AUTH_CACHE } from '@owlmeans/server-auth'
|
|
@@ -12,7 +12,6 @@ export const makeTestContext = () => {
|
|
|
12
12
|
const cfg: Config = {
|
|
13
13
|
ready: false,
|
|
14
14
|
service: 'server-oidc-rp-tests',
|
|
15
|
-
layer: Layer.Service,
|
|
16
15
|
type: AppType.Backend,
|
|
17
16
|
services: {},
|
|
18
17
|
oidc: {
|
package/build/modules.d.ts
DELETED
package/build/modules.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"modules.d.ts","sourceRoot":"","sources":["../src/modules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAQ5D,eAAO,MAAM,uBAAuB,YACzB,gBAAgB,EAAE,gBACb,MAAM,WACZ,MAAM,SAkBf,CAAA"}
|
package/build/modules.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { entrypoint, guard, filter, body } from '@owlmeans/entrypoint';
|
|
2
|
-
import { backend, route, RouteMethod, service } from '@owlmeans/route';
|
|
3
|
-
import { authService } from './consts.js';
|
|
4
|
-
import { elevate } from '@owlmeans/client-entrypoint';
|
|
5
|
-
import { GUARD_ED25519 } from '@owlmeans/auth-common';
|
|
6
|
-
import { OIDCTokenUpdateSchema } from '@owlmeans/oidc';
|
|
7
|
-
export const setupAuthServiceModules = (modules, serviceAlias, prefix = 'oidc-api') => {
|
|
8
|
-
modules.push(entrypoint(route(authService.provider.list, `/${prefix}/provider/:service`, service(serviceAlias)), guard(GUARD_ED25519)), entrypoint(route(authService.auth.update, `/${prefix}/auth/update`, backend(service(serviceAlias), RouteMethod.POST)), filter(body(OIDCTokenUpdateSchema), guard(GUARD_ED25519))));
|
|
9
|
-
elevate(modules, authService.provider.list);
|
|
10
|
-
elevate(modules, authService.auth.update);
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=modules.js.map
|
package/build/modules.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"modules.js","sourceRoot":"","sources":["../src/modules.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AACtE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAA;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAA;AAEtD,MAAM,CAAC,MAAM,uBAAuB,GAAG,CACrC,OAA2B,EAC3B,YAAoB,EACpB,MAAM,GAAW,UAAU,EAC3B,EAAE;IACF,OAAO,CAAC,IAAI,CACV,UAAU,CACR,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,MAAM,oBAAoB,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC,EACvF,KAAK,CAAC,aAAa,CAAC,CACrB,EACD,UAAU,CACR,KAAK,CACH,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,MAAM,cAAc,EACjD,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,WAAW,CAAC,IAAI,CAAC,CACjD,EACD,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAC1D,CACF,CAAA;IAED,OAAO,CAAC,OAAO,EAAE,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;IAC3C,OAAO,CAAC,OAAO,EAAE,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;AAC3C,CAAC,CAAA"}
|
package/src/modules.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { CommonEntrypoint } from '@owlmeans/entrypoint'
|
|
2
|
-
import { entrypoint, guard, filter, body } from '@owlmeans/entrypoint'
|
|
3
|
-
import { backend, route, RouteMethod, service } from '@owlmeans/route'
|
|
4
|
-
import { authService } from './consts.js'
|
|
5
|
-
import { elevate } from '@owlmeans/client-entrypoint'
|
|
6
|
-
import { GUARD_ED25519 } from '@owlmeans/auth-common'
|
|
7
|
-
import { OIDCTokenUpdateSchema } from '@owlmeans/oidc'
|
|
8
|
-
|
|
9
|
-
export const setupAuthServiceModules = (
|
|
10
|
-
modules: CommonEntrypoint[],
|
|
11
|
-
serviceAlias: string,
|
|
12
|
-
prefix: string = 'oidc-api'
|
|
13
|
-
) => {
|
|
14
|
-
modules.push(
|
|
15
|
-
entrypoint(
|
|
16
|
-
route(authService.provider.list, `/${prefix}/provider/:service`, service(serviceAlias)),
|
|
17
|
-
guard(GUARD_ED25519)
|
|
18
|
-
),
|
|
19
|
-
entrypoint(
|
|
20
|
-
route(
|
|
21
|
-
authService.auth.update, `/${prefix}/auth/update`,
|
|
22
|
-
backend(service(serviceAlias), RouteMethod.POST)
|
|
23
|
-
),
|
|
24
|
-
filter(body(OIDCTokenUpdateSchema), guard(GUARD_ED25519))
|
|
25
|
-
)
|
|
26
|
-
)
|
|
27
|
-
|
|
28
|
-
elevate(modules, authService.provider.list)
|
|
29
|
-
elevate(modules, authService.auth.update)
|
|
30
|
-
}
|