@maronn-openid-connect/cli 0.3.0 → 0.5.0
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 +47 -0
- package/dist/features.d.ts +6 -3
- package/dist/features.d.ts.map +1 -1
- package/dist/features.js +14 -0
- package/dist/features.js.map +1 -1
- package/dist/frameworks/express/index.d.ts.map +1 -1
- package/dist/frameworks/express/index.js +1 -1
- package/dist/frameworks/express/index.js.map +1 -1
- package/dist/frameworks/fastify/index.d.ts.map +1 -1
- package/dist/frameworks/fastify/index.js +1 -1
- package/dist/frameworks/fastify/index.js.map +1 -1
- package/dist/frameworks/hono/index.d.ts.map +1 -1
- package/dist/frameworks/hono/index.js +21 -8
- package/dist/frameworks/hono/index.js.map +1 -1
- package/dist/frameworks/hono/templates.d.ts +19 -8
- package/dist/frameworks/hono/templates.d.ts.map +1 -1
- package/dist/frameworks/hono/templates.js +11191 -6376
- package/dist/frameworks/hono/templates.js.map +1 -1
- package/dist/frameworks/nextjs/index.d.ts.map +1 -1
- package/dist/frameworks/nextjs/index.js +1 -1
- package/dist/frameworks/nextjs/index.js.map +1 -1
- package/dist/frameworks/types.d.ts +1 -0
- package/dist/frameworks/types.d.ts.map +1 -1
- package/dist/frameworks/web-standard/templates.d.ts +5 -5
- package/dist/frameworks/web-standard/templates.d.ts.map +1 -1
- package/dist/frameworks/web-standard/templates.js +199 -54
- package/dist/frameworks/web-standard/templates.js.map +1 -1
- package/dist/generator.d.ts +1 -0
- package/dist/generator.d.ts.map +1 -1
- package/dist/generator.js +2 -2
- package/dist/generator.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +34 -3
- package/dist/index.js.map +1 -1
- package/dist/scopes.d.ts +5 -0
- package/dist/scopes.d.ts.map +1 -0
- package/dist/scopes.js +38 -0
- package/dist/scopes.js.map +1 -0
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -50,6 +50,7 @@ maronn-oidc setup <framework> [options]
|
|
|
50
50
|
| `--entry, -e <file>` | setup 時にパッチするエントリファイル(既定: `./src/index.ts`) |
|
|
51
51
|
| `--enable <features>` | 有効化する機能(カンマ区切り・複数回指定可) |
|
|
52
52
|
| `--disable <features>` | 既定セットから外す機能(カンマ区切り・複数回指定可) |
|
|
53
|
+
| `--scope <scopes>` | 生成 OP が受け付けるカスタムスコープ(カンマ区切り・複数回指定可) |
|
|
53
54
|
| `--help, -h` | ヘルプ表示 |
|
|
54
55
|
|
|
55
56
|
## 生成されるもの
|
|
@@ -101,6 +102,52 @@ maronn-oidc generate express --disable pkce
|
|
|
101
102
|
Basic OP に必須の機能(authorize / token / userinfo / discovery / jwks / login / consent)はトグル対象外で、常に生成される。
|
|
102
103
|
未知の機能名や、同じ機能を `--enable` と `--disable` の両方に指定した場合はエラーになる。
|
|
103
104
|
|
|
105
|
+
## カスタムスコープ(--scope)
|
|
106
|
+
|
|
107
|
+
標準スコープ(`openid` / `profile` / `email` / `address` / `phone` / `offline_access`)以外に受け付けるスコープを、生成時に宣言できる。
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
maronn-oidc generate hono --scope reports.read,reports.write
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
宣言すると `scopes.ts`(スコープポリシー)が生成され、生成 OP は次のようになる。
|
|
114
|
+
|
|
115
|
+
- discovery の `scopes_supported` に宣言したスコープが載る
|
|
116
|
+
- **宣言していないスコープ値は `invalid_scope` で拒否される**(RFC 6749 §3.3 / §4.1.2.1)。宣言が 1 つも無ければこのチェック自体を生成しないので、既定の生成物の挙動は変わらない
|
|
117
|
+
- ユーザーごとの絞り込みは、生成された `scopes.ts` に書く
|
|
118
|
+
|
|
119
|
+
### ユーザーごとの絞り込みは生成コードに書く
|
|
120
|
+
|
|
121
|
+
「誰にどのスコープを許すか」は CLI のオプションにしていない。運用ごとに条件(ロール、テナント、DB 参照)が違い、生成コードを改造して検証するというこのライブラリの使い方に合わないためである。代わりに、生成される `scopes.ts` に絞り込みの入口を用意し、判断が必要な全ステップから呼び出した状態で生成する。
|
|
122
|
+
|
|
123
|
+
```typescript
|
|
124
|
+
// scopes.ts
|
|
125
|
+
export const RESTRICTED_SCOPE_SUBJECTS: Record<string, readonly string[]> = {
|
|
126
|
+
'reports.read': ['alice'], // ← 手早く絞るならここに書く
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
export async function resolveGrantableScopes(
|
|
130
|
+
requested: readonly string[],
|
|
131
|
+
subject: string,
|
|
132
|
+
): Promise<string[]> {
|
|
133
|
+
// ← ロール・テナント・DB 参照など、複雑な条件はここに書く(async なので
|
|
134
|
+
// DB / KV 参照を入れても呼び出し側の変更は不要)
|
|
135
|
+
return requested.filter((scope) => { /* ... */ });
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
`resolveGrantableScopes()` は End-User が確定した後に呼ばれ、生成コードの次の箇所からすでに `await` されている。
|
|
140
|
+
|
|
141
|
+
| 呼び出し元 | タイミング |
|
|
142
|
+
|---|---|
|
|
143
|
+
| `routes/consent.ts` | 同意画面の表示内容と、承認時の付与スコープ |
|
|
144
|
+
| `routes/authorize.ts` | SSO fast path と `prompt=none`(同意画面を出さずに付与する経路)。どちらも**保存済み同意を引く前**に適用する。絞る前の scope で同意を探すと、そのユーザーが持てないスコープをキーに検索することになり永久に一致しない |
|
|
145
|
+
| `routes/device.ts` / `routes/ciba-verification.ts` | device / CIBA の承認ステップ(該当機能を有効にした場合) |
|
|
146
|
+
|
|
147
|
+
落としたスコープはリクエストを失敗させず、付与スコープを狭めるだけになる(RFC 6749 §3.3 は要求より狭いスコープの発行を認めており、トークンレスポンスの `scope` に実際の付与内容が載る)。リクエストごと拒否したい場合は、呼び出し元で throw する。
|
|
148
|
+
|
|
149
|
+
カスタムスコープに対応する UserInfo クレームは無い(OIDC Core 1.0 §5.4 が定義するのは profile / email / address / phone のみ)。独自クレームを返す場合は `routes/userinfo.ts` を編集する。
|
|
150
|
+
|
|
104
151
|
### conformance.test.ts との関係
|
|
105
152
|
|
|
106
153
|
生成物には `conformance.test.ts`(契約テスト)が含まれ、選択した機能構成に合わせた内容で生成される。
|
package/dist/features.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export declare const AVAILABLE_FEATURES: readonly [
|
|
1
|
+
export declare const AVAILABLE_FEATURES: readonly ['pkce', 'refresh-token', 'introspection', 'revocation', 'request-object'];
|
|
2
2
|
export type FeatureName = (typeof AVAILABLE_FEATURES)[number];
|
|
3
|
-
export declare const OPTIONAL_FEATURES: readonly [
|
|
3
|
+
export declare const OPTIONAL_FEATURES: readonly ['transaction-binding'];
|
|
4
4
|
export type OptionalFeatureName = (typeof OPTIONAL_FEATURES)[number];
|
|
5
|
-
export declare const EXPERIMENTAL_FEATURES: readonly [
|
|
5
|
+
export declare const EXPERIMENTAL_FEATURES: readonly ['par', 'token-exchange', 'jarm', 'device-authorization-grant', 'id-jag', 'ciba', 'jwt-introspection-response'];
|
|
6
6
|
export type ExperimentalFeatureName = (typeof EXPERIMENTAL_FEATURES)[number];
|
|
7
7
|
export interface OidcFeatureConfig {
|
|
8
8
|
pkce: boolean;
|
|
@@ -14,6 +14,9 @@ export interface OidcFeatureConfig {
|
|
|
14
14
|
tokenExchange: boolean;
|
|
15
15
|
jarm: boolean;
|
|
16
16
|
deviceAuthorizationGrant: boolean;
|
|
17
|
+
idJag: boolean;
|
|
18
|
+
ciba: boolean;
|
|
19
|
+
jwtIntrospectionResponse: boolean;
|
|
17
20
|
transactionBinding: boolean;
|
|
18
21
|
}
|
|
19
22
|
export declare const DEFAULT_FEATURES: OidcFeatureConfig;
|
package/dist/features.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features.d.ts","sourceRoot":"","sources":["../src/features.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"features.d.ts","sourceRoot":"","sources":["../src/features.ts"],"names":[],"mappings":"AAkBA,eA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|
'token-exchange',
|
|
12
12
|
'jarm',
|
|
13
13
|
'device-authorization-grant',
|
|
14
|
+
'id-jag',
|
|
15
|
+
'ciba',
|
|
16
|
+
'jwt-introspection-response',
|
|
14
17
|
];
|
|
15
18
|
const FEATURE_KEYS = {
|
|
16
19
|
pkce: 'pkce',
|
|
@@ -27,6 +30,9 @@ const EXPERIMENTAL_FEATURE_KEYS = {
|
|
|
27
30
|
'token-exchange': 'tokenExchange',
|
|
28
31
|
jarm: 'jarm',
|
|
29
32
|
'device-authorization-grant': 'deviceAuthorizationGrant',
|
|
33
|
+
'id-jag': 'idJag',
|
|
34
|
+
ciba: 'ciba',
|
|
35
|
+
'jwt-introspection-response': 'jwtIntrospectionResponse',
|
|
30
36
|
};
|
|
31
37
|
export const DEFAULT_FEATURES = {
|
|
32
38
|
pkce: true,
|
|
@@ -38,6 +44,9 @@ export const DEFAULT_FEATURES = {
|
|
|
38
44
|
tokenExchange: false,
|
|
39
45
|
jarm: false,
|
|
40
46
|
deviceAuthorizationGrant: false,
|
|
47
|
+
idJag: false,
|
|
48
|
+
ciba: false,
|
|
49
|
+
jwtIntrospectionResponse: false,
|
|
41
50
|
transactionBinding: false,
|
|
42
51
|
};
|
|
43
52
|
function isOptionalFeature(name) {
|
|
@@ -80,6 +89,11 @@ export function resolveFeatures(options) {
|
|
|
80
89
|
assertKnownFeature(name);
|
|
81
90
|
features[featureKey(name)] = false;
|
|
82
91
|
}
|
|
92
|
+
if (features.jwtIntrospectionResponse && !features.introspection) {
|
|
93
|
+
throw new Error('Feature "jwt-introspection-response" requires the introspection feature: ' +
|
|
94
|
+
'the RFC 9701 JWT response is returned by the RFC 7662 introspection endpoint, ' +
|
|
95
|
+
'which is not generated when introspection is disabled');
|
|
96
|
+
}
|
|
83
97
|
return features;
|
|
84
98
|
}
|
|
85
99
|
//# sourceMappingURL=features.js.map
|
package/dist/features.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features.js","sourceRoot":"","sources":["../src/features.ts"],"names":[],"mappings":"AAkBA,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,MAAM;IACN,eAAe;IACf,eAAe;IACf,YAAY;IACZ,gBAAgB;CACR,CAAC;AAmBX,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,qBAAqB,CAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"features.js","sourceRoot":"","sources":["../src/features.ts"],"names":[],"mappings":"AAkBA,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,MAAM;IACN,eAAe;IACf,eAAe;IACf,YAAY;IACZ,gBAAgB;CACR,CAAC;AAmBX,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,qBAAqB,CAAU,CAAC;AA6BlE,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,KAAK;IACL,gBAAgB;IAChB,MAAM;IACN,4BAA4B;IAC5B,QAAQ;IACR,MAAM;IACN,4BAA4B;CACpB,CAAC;AAgFX,MAAM,YAAY,GAAiD;IACjE,IAAI,EAAE,MAAM;IACZ,eAAe,EAAE,cAAc;IAC/B,aAAa,EAAE,eAAe;IAC9B,UAAU,EAAE,YAAY;IACxB,gBAAgB,EAAE,eAAe;CAClC,CAAC;AAGF,MAAM,qBAAqB,GAAyD;IAClF,qBAAqB,EAAE,oBAAoB;CAC5C,CAAC;AAGF,MAAM,yBAAyB,GAA6D;IAC1F,GAAG,EAAE,KAAK;IACV,gBAAgB,EAAE,eAAe;IACjC,IAAI,EAAE,MAAM;IACZ,4BAA4B,EAAE,0BAA0B;IACxD,QAAQ,EAAE,OAAO;IACjB,IAAI,EAAE,MAAM;IACZ,4BAA4B,EAAE,0BAA0B;CACzD,CAAC;AAMF,MAAM,CAAC,MAAM,gBAAgB,GAAsB;IACjD,IAAI,EAAE,IAAI;IACV,YAAY,EAAE,IAAI;IAClB,aAAa,EAAE,IAAI;IACnB,UAAU,EAAE,IAAI;IAChB,aAAa,EAAE,IAAI;IACnB,GAAG,EAAE,KAAK;IAC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QAAQ,CAAC,OAAO,EAAE,gBAAgB,GAAG,aAAa,EAAE;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/frameworks/express/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGvF,qBAAa,gBAAiB,YAAW,kBAAkB;IACzD,QAAQ,CAAC,IAAI,aAAa;IAC1B,QAAQ,CAAC,WAAW,aAAa;IAEjC,QAAQ,CAAC,OAAO,EAAE,gBAAgB,GAAG,aAAa,EAAE,CAOnD;CACF"}
|
|
@@ -3,7 +3,7 @@ export class ExpressGenerator {
|
|
|
3
3
|
name = 'express';
|
|
4
4
|
displayName = 'Express';
|
|
5
5
|
generate(options) {
|
|
6
|
-
return webGeneratedFiles(options.corePackageName, expressApplyTemplate(options.features), options.features);
|
|
6
|
+
return webGeneratedFiles(options.corePackageName, expressApplyTemplate(options.features), options.features, options.scopes);
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/frameworks/express/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEvF,MAAM,OAAO,gBAAgB;IAClB,IAAI,GAAG,SAAS,CAAC;IACjB,WAAW,GAAG,SAAS,CAAC;IAEjC,QAAQ,CAAC,OAAyB;QAChC,OAAO,iBAAiB,CACtB,OAAO,CAAC,eAAe,EACvB,oBAAoB,CAAC,OAAO,CAAC,QAAQ,CAAC,EACtC,OAAO,CAAC,QAAQ,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/frameworks/express/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEvF,MAAM,OAAO,gBAAgB;IAClB,IAAI,GAAG,SAAS,CAAC;IACjB,WAAW,GAAG,SAAS,CAAC;IAEjC,QAAQ,CAAC,OAAyB;QAChC,OAAO,iBAAiB,CACtB,OAAO,CAAC,eAAe,EACvB,oBAAoB,CAAC,OAAO,CAAC,QAAQ,CAAC,EACtC,OAAO,CAAC,QAAQ,EAChB,OAAO,CAAC,MAAM,CACf,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/frameworks/fastify/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGvF,qBAAa,gBAAiB,YAAW,kBAAkB;IACzD,QAAQ,CAAC,IAAI,aAAa;IAC1B,QAAQ,CAAC,WAAW,aAAa;IAEjC,QAAQ,CAAC,OAAO,EAAE,gBAAgB,GAAG,aAAa,EAAE;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/frameworks/fastify/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGvF,qBAAa,gBAAiB,YAAW,kBAAkB;IACzD,QAAQ,CAAC,IAAI,aAAa;IAC1B,QAAQ,CAAC,WAAW,aAAa;IAEjC,QAAQ,CAAC,OAAO,EAAE,gBAAgB,GAAG,aAAa,EAAE,CAOnD;CACF"}
|
|
@@ -3,7 +3,7 @@ export class FastifyGenerator {
|
|
|
3
3
|
name = 'fastify';
|
|
4
4
|
displayName = 'Fastify';
|
|
5
5
|
generate(options) {
|
|
6
|
-
return webGeneratedFiles(options.corePackageName, fastifyApplyTemplate(options.features), options.features);
|
|
6
|
+
return webGeneratedFiles(options.corePackageName, fastifyApplyTemplate(options.features), options.features, options.scopes);
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/frameworks/fastify/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEvF,MAAM,OAAO,gBAAgB;IAClB,IAAI,GAAG,SAAS,CAAC;IACjB,WAAW,GAAG,SAAS,CAAC;IAEjC,QAAQ,CAAC,OAAyB;QAChC,OAAO,iBAAiB,CACtB,OAAO,CAAC,eAAe,EACvB,oBAAoB,CAAC,OAAO,CAAC,QAAQ,CAAC,EACtC,OAAO,CAAC,QAAQ,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/frameworks/fastify/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEvF,MAAM,OAAO,gBAAgB;IAClB,IAAI,GAAG,SAAS,CAAC;IACjB,WAAW,GAAG,SAAS,CAAC;IAEjC,QAAQ,CAAC,OAAyB;QAChC,OAAO,iBAAiB,CACtB,OAAO,CAAC,eAAe,EACvB,oBAAoB,CAAC,OAAO,CAAC,QAAQ,CAAC,EACtC,OAAO,CAAC,QAAQ,EAChB,OAAO,CAAC,MAAM,CACf,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/frameworks/hono/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/frameworks/hono/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AA4BvF,qBAAa,aAAc,YAAW,kBAAkB;IACtD,QAAQ,CAAC,IAAI,UAAU;IACvB,QAAQ,CAAC,WAAW,UAAU;IAE9B,QAAQ,CAAC,OAAO,EAAE,gBAAgB,GAAG,aAAa,EAAE,CA4DnD;CACF"}
|
|
@@ -1,23 +1,27 @@
|
|
|
1
1
|
import { DEFAULT_FEATURES } from '../../features.js';
|
|
2
|
-
import { appTemplate, applyTemplate, configTemplate, storeTemplate, resolversTemplate, viewsTemplate, authorizeRouteTemplate, tokenRouteTemplate, userinfoRouteTemplate, introspectionRouteTemplate, revocationRouteTemplate, jwksRouteTemplate, parRouteTemplate, deviceAuthorizationRouteTemplate, deviceVerificationRouteTemplate, jarmConfigTemplate, discoveryRouteTemplate, loginRouteTemplate, consentRouteTemplate, conformanceTestTemplate, } from './templates.js';
|
|
2
|
+
import { appTemplate, applyTemplate, configTemplate, customScopesTemplate, storeTemplate, resolversTemplate, viewsTemplate, authorizeRouteTemplate, tokenRouteTemplate, userinfoRouteTemplate, introspectionRouteTemplate, revocationRouteTemplate, jwksRouteTemplate, parRouteTemplate, deviceAuthorizationRouteTemplate, deviceVerificationRouteTemplate, backchannelAuthenticationRouteTemplate, cibaVerificationRouteTemplate, jarmConfigTemplate, discoveryRouteTemplate, loginRouteTemplate, consentRouteTemplate, conformanceTestTemplate, } from './templates.js';
|
|
3
3
|
export class HonoGenerator {
|
|
4
4
|
name = 'hono';
|
|
5
5
|
displayName = 'Hono';
|
|
6
6
|
generate(options) {
|
|
7
7
|
const pkg = options.corePackageName;
|
|
8
8
|
const features = options.features ?? DEFAULT_FEATURES;
|
|
9
|
+
const scopes = options.scopes ?? [];
|
|
9
10
|
return [
|
|
10
11
|
{ path: 'app.ts', content: appTemplate(pkg, features) },
|
|
11
12
|
{ path: 'apply.ts', content: applyTemplate(pkg, features) },
|
|
12
13
|
{ path: 'config.ts', content: configTemplate(pkg, features) },
|
|
14
|
+
...(scopes.length > 0
|
|
15
|
+
? [{ path: 'scopes.ts', content: customScopesTemplate(scopes, features) }]
|
|
16
|
+
: []),
|
|
13
17
|
{ path: 'store.ts', content: storeTemplate(pkg, features) },
|
|
14
18
|
{ path: 'resolvers.ts', content: resolversTemplate(pkg, features) },
|
|
15
19
|
{ path: 'views.ts', content: viewsTemplate(features) },
|
|
16
|
-
{ path: 'routes/authorize.ts', content: authorizeRouteTemplate(pkg, features) },
|
|
20
|
+
{ path: 'routes/authorize.ts', content: authorizeRouteTemplate(pkg, features, scopes) },
|
|
17
21
|
{ path: 'routes/token.ts', content: tokenRouteTemplate(pkg, features) },
|
|
18
22
|
{ path: 'routes/userinfo.ts', content: userinfoRouteTemplate(pkg) },
|
|
19
23
|
...(features.introspection
|
|
20
|
-
? [{ path: 'routes/introspection.ts', content: introspectionRouteTemplate(pkg) }]
|
|
24
|
+
? [{ path: 'routes/introspection.ts', content: introspectionRouteTemplate(pkg, features) }]
|
|
21
25
|
: []),
|
|
22
26
|
...(features.revocation
|
|
23
27
|
? [{ path: 'routes/revocation.ts', content: revocationRouteTemplate(pkg) }]
|
|
@@ -29,19 +33,28 @@ export class HonoGenerator {
|
|
|
29
33
|
? [
|
|
30
34
|
{
|
|
31
35
|
path: 'routes/device-authorization.ts',
|
|
32
|
-
content: deviceAuthorizationRouteTemplate(pkg, features),
|
|
36
|
+
content: deviceAuthorizationRouteTemplate(pkg, features, scopes),
|
|
37
|
+
},
|
|
38
|
+
{ path: 'routes/device.ts', content: deviceVerificationRouteTemplate(pkg, scopes) },
|
|
39
|
+
]
|
|
40
|
+
: []),
|
|
41
|
+
...(features.ciba
|
|
42
|
+
? [
|
|
43
|
+
{
|
|
44
|
+
path: 'routes/backchannel-authentication.ts',
|
|
45
|
+
content: backchannelAuthenticationRouteTemplate(pkg, features, scopes),
|
|
33
46
|
},
|
|
34
|
-
{ path: 'routes/
|
|
47
|
+
{ path: 'routes/ciba-verification.ts', content: cibaVerificationRouteTemplate(pkg, scopes) },
|
|
35
48
|
]
|
|
36
49
|
: []),
|
|
37
50
|
...(features.jarm
|
|
38
51
|
? [{ path: 'routes/jarm.ts', content: jarmConfigTemplate() }]
|
|
39
52
|
: []),
|
|
40
53
|
{ path: 'routes/jwks.ts', content: jwksRouteTemplate(pkg) },
|
|
41
|
-
{ path: 'routes/discovery.ts', content: discoveryRouteTemplate(pkg, features) },
|
|
54
|
+
{ path: 'routes/discovery.ts', content: discoveryRouteTemplate(pkg, features, scopes) },
|
|
42
55
|
{ path: 'routes/login.ts', content: loginRouteTemplate(pkg, features) },
|
|
43
|
-
{ path: 'routes/consent.ts', content: consentRouteTemplate(pkg, features) },
|
|
44
|
-
{ path: 'conformance.test.ts', content: conformanceTestTemplate(pkg, features) },
|
|
56
|
+
{ path: 'routes/consent.ts', content: consentRouteTemplate(pkg, features, scopes) },
|
|
57
|
+
{ path: 'conformance.test.ts', content: conformanceTestTemplate(pkg, features, scopes) },
|
|
45
58
|
];
|
|
46
59
|
}
|
|
47
60
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/frameworks/hono/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EACL,WAAW,EACX,aAAa,EACb,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,sBAAsB,EACtB,kBAAkB,EAClB,qBAAqB,EACrB,0BAA0B,EAC1B,uBAAuB,EACvB,iBAAiB,EACjB,gBAAgB,EAChB,gCAAgC,EAChC,+BAA+B,EAC/B,kBAAkB,EAClB,sBAAsB,EACtB,kBAAkB,EAClB,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,gBAAgB,CAAC;AAExB,MAAM,OAAO,aAAa;IACf,IAAI,GAAG,MAAM,CAAC;IACd,WAAW,GAAG,MAAM,CAAC;IAE9B,QAAQ,CAAC,OAAyB;QAChC,MAAM,GAAG,GAAG,OAAO,CAAC,eAAe,CAAC;QACpC,MAAM,QAAQ,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;CACF"}
|
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
import type { OidcFeatureConfig } from '../../features.js';
|
|
2
2
|
export declare const EXPERIMENTAL_PACKAGE = "@maronn-openid-connect/experimental";
|
|
3
3
|
export declare function appTemplate(_corePkg: string, features?: OidcFeatureConfig): string;
|
|
4
|
+
export declare function customScopesTemplate(scopes: string[], features?: OidcFeatureConfig): string;
|
|
4
5
|
export declare function configTemplate(corePkg: string, features?: OidcFeatureConfig): string;
|
|
5
6
|
export declare function storeTemplate(corePkg: string, features?: OidcFeatureConfig): string;
|
|
6
7
|
export declare function resolversTemplate(corePkg: string, features?: OidcFeatureConfig): string;
|
|
7
|
-
export declare function authorizeRouteTemplate(corePkg: string, features?: OidcFeatureConfig): string;
|
|
8
|
+
export declare function authorizeRouteTemplate(corePkg: string, features?: OidcFeatureConfig, scopes?: string[]): string;
|
|
8
9
|
export declare function parRouteTemplate(corePkg: string): string;
|
|
9
|
-
export declare function deviceAuthorizationRouteTemplate(corePkg: string, features?: OidcFeatureConfig): string;
|
|
10
|
-
export declare function deviceVerificationRouteTemplate(corePkg: string): string;
|
|
10
|
+
export declare function deviceAuthorizationRouteTemplate(corePkg: string, features?: OidcFeatureConfig, scopes?: string[]): string;
|
|
11
|
+
export declare function deviceVerificationRouteTemplate(corePkg: string, scopes?: string[]): string;
|
|
12
|
+
export declare function backchannelAuthenticationRouteTemplate(corePkg: string, features?: OidcFeatureConfig, scopes?: string[]): string;
|
|
13
|
+
export declare function cibaVerificationRouteTemplate(corePkg: string, scopes?: string[]): string;
|
|
11
14
|
export declare function jarmConfigTemplate(): string;
|
|
12
15
|
export declare function tokenRouteTemplate(corePkg: string, features?: OidcFeatureConfig): string;
|
|
13
16
|
export declare function userinfoRouteTemplate(corePkg: string): string;
|
|
14
17
|
export declare function jwksRouteTemplate(corePkg: string): string;
|
|
15
|
-
export declare function discoveryRouteTemplate(corePkg: string, features?: OidcFeatureConfig): string;
|
|
18
|
+
export declare function discoveryRouteTemplate(corePkg: string, features?: OidcFeatureConfig, scopes?: string[]): string;
|
|
16
19
|
export declare function loginRouteTemplate(corePkg: string, features?: OidcFeatureConfig): string;
|
|
17
|
-
export declare function consentRouteTemplate(corePkg: string, features?: OidcFeatureConfig): string;
|
|
20
|
+
export declare function consentRouteTemplate(corePkg: string, features?: OidcFeatureConfig, scopes?: string[]): string;
|
|
18
21
|
export declare function applyTemplate(_corePkg: string, features?: OidcFeatureConfig): string;
|
|
19
|
-
export declare function introspectionRouteTemplate(corePkg: string): string;
|
|
22
|
+
export declare function introspectionRouteTemplate(corePkg: string, features?: OidcFeatureConfig): string;
|
|
20
23
|
export declare function revocationRouteTemplate(corePkg: string): string;
|
|
21
24
|
export declare function viewsTemplate(features?: OidcFeatureConfig): string;
|
|
22
25
|
export declare function requestObjectConformanceModuleSetup(features?: OidcFeatureConfig): string;
|
|
@@ -25,22 +28,30 @@ export declare function reuseFlowConformanceTestBlock(features?: OidcFeatureConf
|
|
|
25
28
|
export declare function transactionBindingConformanceBlock(features?: OidcFeatureConfig): string;
|
|
26
29
|
export declare function customViewConformanceTestBlock(): string;
|
|
27
30
|
export declare function authorizationCodeConformanceHelper(features: OidcFeatureConfig): string;
|
|
31
|
+
export declare function jwtIntrospectionResponseConformanceClients(features: OidcFeatureConfig): string;
|
|
32
|
+
export declare function jwtIntrospectionResponseConformanceBlock(features: OidcFeatureConfig): string;
|
|
28
33
|
export declare function conformanceTestClientsBlock(features: OidcFeatureConfig): string;
|
|
29
|
-
export declare function scopesSupportedConformanceTest(features: OidcFeatureConfig): string;
|
|
34
|
+
export declare function scopesSupportedConformanceTest(features: OidcFeatureConfig, scopes?: string[]): string;
|
|
35
|
+
export declare function customScopeConformanceBlock(scopes?: string[]): string;
|
|
30
36
|
export declare function featureDisabledDiscoveryConformanceTests(features: OidcFeatureConfig): string;
|
|
31
37
|
export declare function introspectionConformanceBlock(features: OidcFeatureConfig): string;
|
|
32
38
|
export declare function revocationDisabledConformanceBlock(features: OidcFeatureConfig): string;
|
|
33
39
|
export declare function pkceDisabledConformanceBlock(features: OidcFeatureConfig): string;
|
|
34
40
|
export declare function tokenEndpointAuthMethodsConformanceBlock(): string;
|
|
41
|
+
export declare function internalRedirectOriginConformanceBlock(): string;
|
|
35
42
|
export declare function endpointBehaviorConformanceBlock(features: OidcFeatureConfig, includeHonoApplyParity?: boolean): string;
|
|
36
43
|
export declare function idTokenHintConformanceBlock(): string;
|
|
37
44
|
export declare function consentWithdrawalConformanceBlock(features: OidcFeatureConfig): string;
|
|
45
|
+
export declare function onlineRefreshTokenConformanceStoreImport(features: OidcFeatureConfig): string;
|
|
46
|
+
export declare function onlineRefreshTokenConformanceBlock(features: OidcFeatureConfig): string;
|
|
38
47
|
export declare function persistentStorageConformanceBlock(): string;
|
|
39
48
|
export declare function tokenExchangeConformanceBlock(features: OidcFeatureConfig): string;
|
|
49
|
+
export declare function idJagConformanceBlock(features: OidcFeatureConfig): string;
|
|
40
50
|
export declare function parConformanceBlock(features: OidcFeatureConfig): string;
|
|
41
51
|
export type JarmConsentResponseMode = 'jwt' | 'plain';
|
|
42
52
|
export declare function deviceAuthorizationConformanceBlock(features: OidcFeatureConfig): string;
|
|
53
|
+
export declare function cibaConformanceBlock(features: OidcFeatureConfig): string;
|
|
43
54
|
export declare function jarmConformanceBlock(features: OidcFeatureConfig, consentResponseMode?: JarmConsentResponseMode): string;
|
|
44
55
|
export declare function consentDecisionConformanceBlock(): string;
|
|
45
|
-
export declare function conformanceTestTemplate(corePkg: string, features?: OidcFeatureConfig): string;
|
|
56
|
+
export declare function conformanceTestTemplate(corePkg: string, features?: OidcFeatureConfig, scopes?: string[]): string;
|
|
46
57
|
//# sourceMappingURL=templates.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../../src/frameworks/hono/templates.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAO3D,eAA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