@owlmeans/client-iam 0.1.18-rc.61 → 0.1.18-rc.62

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 CHANGED
@@ -6,7 +6,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
6
6
  your project's skill store (`.agents/skills/`):
7
7
 
8
8
  ```sh
9
- npx @owlmeans/agent-skills@^0.1.18-rc.47
9
+ npx @owlmeans/agent-skills@^0.1.18-rc.48
10
10
  ```
11
11
 
12
12
  The embedded files are version-matched to this package release. Do not edit them
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
3
  "package": "@owlmeans/client-iam",
4
- "version": "0.1.18-rc.61",
5
- "generatedAt": "2026-10-03T20:05:07.603Z",
4
+ "version": "0.1.18-rc.62",
5
+ "generatedAt": "2026-10-05T08:32:19.128Z",
6
6
  "canonicalRepo": "https://github.com/owlmeans/common",
7
7
  "entries": [
8
8
  {
@@ -8,7 +8,7 @@ user-invocable: false
8
8
  # @owlmeans/client-iam
9
9
 
10
10
  **Layer:** Client (browser-only — it depends on `@owlmeans/web-client` and `@owlmeans/web-oidc-rp`)
11
- **Install:** `"@owlmeans/client-iam": "^0.1.18-rc.61"` in `dependencies`
11
+ **Install:** `"@owlmeans/client-iam": "^0.1.18-rc.62"` in `dependencies`
12
12
 
13
13
  The browser side of the IAM for an application that signs its people in through an OwlMeans OIDC
14
14
  provider. One import wires the relying party, puts the consent precondition in front of every
package/build/append.d.ts CHANGED
@@ -1,12 +1,5 @@
1
- import type { AppConfig, AppContext } from '@owlmeans/web-client';
2
- import type { WithSharedConfig } from '@owlmeans/oidc';
3
- import type { ConsentLoginOptions } from './consent.js';
4
- type IamClientConfig = AppConfig & WithSharedConfig;
5
- type IamClientContext<C extends IamClientConfig = IamClientConfig> = AppContext<C>;
6
- export interface AppendIamOptions {
7
- /** Consent required before a sign-in flow may start. `{ disabled: true }` turns it off. */
8
- consent?: ConsentLoginOptions;
9
- }
1
+ import type { IamClientConfig, IamClientContext } from './types.local.js';
2
+ import type { AppendIamOptions } from './types.js';
10
3
  /**
11
4
  * One-call OIDC RP setup for a web client context.
12
5
  *
@@ -21,5 +14,4 @@ export interface AppendIamOptions {
21
14
  * cookie at all passes `{ consent: { disabled: true } }`.
22
15
  */
23
16
  export declare const appendIam: <C extends IamClientConfig, T extends IamClientContext<C>>(context: T, opts?: AppendIamOptions) => T;
24
- export {};
25
17
  //# sourceMappingURL=append.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"append.d.ts","sourceRoot":"","sources":["../src/append.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAGtD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAEvD,KAAK,eAAe,GAAG,SAAS,GAAG,gBAAgB,CAAA;AACnD,KAAK,gBAAgB,CAAC,CAAC,SAAS,eAAe,GAAG,eAAe,IAAI,UAAU,CAAC,CAAC,CAAC,CAAA;AAElF,MAAM,WAAW,gBAAgB;IAC/B,2FAA2F;IAC3F,OAAO,CAAC,EAAE,mBAAmB,CAAA;CAC9B;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,SAAS,GAAI,CAAC,SAAS,eAAe,EAAE,CAAC,SAAS,gBAAgB,CAAC,CAAC,CAAC,WACvE,CAAC,SAAS,gBAAgB,KAClC,CAKF,CAAA"}
1
+ {"version":3,"file":"append.d.ts","sourceRoot":"","sources":["../src/append.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AACzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAGlD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,SAAS,GAAI,CAAC,SAAS,eAAe,EAAE,CAAC,SAAS,gBAAgB,CAAC,CAAC,CAAC,WACvE,CAAC,SAAS,gBAAgB,KAClC,CAKF,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"append.js","sourceRoot":"","sources":["../src/append.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAA;AAWrD;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CACvB,OAAU,EAAE,IAAuB,EAChC,EAAE;IACL,eAAe,CAAO,OAAO,CAAC,CAAA;IAC9B,sBAAsB,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,CAAA;IAE9C,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA"}
1
+ {"version":3,"file":"append.js","sourceRoot":"","sources":["../src/append.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAA;AAKrD;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CACvB,OAAU,EAAE,IAAuB,EAChC,EAAE;IACL,eAAe,CAAO,OAAO,CAAC,CAAA;IAC9B,sBAAsB,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,CAAA;IAE9C,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA"}
@@ -1,11 +1,5 @@
1
1
  import type { BasicContext } from '@owlmeans/context';
2
- export declare const CONSENT_LOGIN_PRECONDITION = "consent-before-login";
3
- export interface ConsentLoginOptions {
4
- /** The category that must be granted. Defaults to `essential`. */
5
- category?: string;
6
- /** Off switch, for an application that genuinely sets no cookie at all. */
7
- disabled?: boolean;
8
- }
2
+ import type { ConsentLoginOptions } from './types.js';
9
3
  /**
10
4
  * Refuse to start a sign-in flow until the required consent category is granted, and open the
11
5
  * consent dialog in the same gesture so the user can grant it.
@@ -1 +1 @@
1
- {"version":3,"file":"consent.d.ts","sourceRoot":"","sources":["../src/consent.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,eAAO,MAAM,0BAA0B,yBAAyB,CAAA;AAEhE,MAAM,WAAW,mBAAmB;IAClC,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,sBAAsB,QAC5B,YAAY,CAAC,GAAG,CAAC,SAAS,mBAAmB,KACjD,IAoBF,CAAA"}
1
+ {"version":3,"file":"consent.d.ts","sourceRoot":"","sources":["../src/consent.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAErD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,sBAAsB,QAC5B,YAAY,CAAC,GAAG,CAAC,SAAS,mBAAmB,KACjD,IAoBF,CAAA"}
package/build/consent.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { CONSENT_ESSENTIAL, consentStore } from '@owlmeans/consent';
2
2
  import { ensureLoginService } from '@owlmeans/client-auth/login';
3
- export const CONSENT_LOGIN_PRECONDITION = 'consent-before-login';
3
+ import { CONSENT_LOGIN_PRECONDITION } from './consts.js';
4
4
  /**
5
5
  * Refuse to start a sign-in flow until the required consent category is granted, and open the
6
6
  * consent dialog in the same gesture so the user can grant it.
@@ -1 +1 @@
1
- {"version":3,"file":"consent.js","sourceRoot":"","sources":["../src/consent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAGhE,MAAM,CAAC,MAAM,0BAA0B,GAAG,sBAAsB,CAAA;AAShE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CACpC,GAAsB,EAAE,IAA0B,EAC5C,EAAE;IACR,IAAI,IAAI,EAAE,QAAQ,KAAK,IAAI,EAAE,CAAC;QAC5B,OAAM;IACR,CAAC;IACD,MAAM,QAAQ,GAAG,IAAI,EAAE,QAAQ,IAAI,iBAAiB,CAAA;IAEpD,kBAAkB,CAAC,GAAG,CAAC,CAAC,oBAAoB,CAAC;QAC3C,KAAK,EAAE,0BAA0B;QACjC,0FAA0F;QAC1F,qFAAqF;QACrF,QAAQ,EAAE,GAAG;QACb,KAAK,EAAE,GAAG,EAAE;YACV,IAAI,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,YAAY,CAAC,GAAG,EAAE,CAAC,MAAM,IAAI,IAAI,EAAE,CAAC;gBACxE,OAAO,IAAI,CAAA;YACb,CAAC;YACD,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;YAE1B,OAAO,KAAK,CAAA;QACd,CAAC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA"}
1
+ {"version":3,"file":"consent.js","sourceRoot":"","sources":["../src/consent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAEhE,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AAGxD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CACpC,GAAsB,EAAE,IAA0B,EAC5C,EAAE;IACR,IAAI,IAAI,EAAE,QAAQ,KAAK,IAAI,EAAE,CAAC;QAC5B,OAAM;IACR,CAAC;IACD,MAAM,QAAQ,GAAG,IAAI,EAAE,QAAQ,IAAI,iBAAiB,CAAA;IAEpD,kBAAkB,CAAC,GAAG,CAAC,CAAC,oBAAoB,CAAC;QAC3C,KAAK,EAAE,0BAA0B;QACjC,0FAA0F;QAC1F,qFAAqF;QACrF,QAAQ,EAAE,GAAG;QACb,KAAK,EAAE,GAAG,EAAE;YACV,IAAI,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,YAAY,CAAC,GAAG,EAAE,CAAC,MAAM,IAAI,IAAI,EAAE,CAAC;gBACxE,OAAO,IAAI,CAAA;YACb,CAAC;YACD,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;YAE1B,OAAO,KAAK,CAAA;QACd,CAAC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA"}
package/build/consts.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export declare const CLIENT_IAM_SERVICE = "client-iam-service";
2
+ export declare const CONSENT_LOGIN_PRECONDITION = "consent-before-login";
2
3
  //# sourceMappingURL=consts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,uBAAuB,CAAA"}
1
+ {"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,uBAAuB,CAAA;AAEtD,eAAO,MAAM,0BAA0B,yBAAyB,CAAA"}
package/build/consts.js CHANGED
@@ -1,2 +1,3 @@
1
1
  export const CLIENT_IAM_SERVICE = 'client-iam-service';
2
+ export const CONSENT_LOGIN_PRECONDITION = 'consent-before-login';
2
3
  //# sourceMappingURL=consts.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"consts.js","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAG,oBAAoB,CAAA"}
1
+ {"version":3,"file":"consts.js","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAG,oBAAoB,CAAA;AAEtD,MAAM,CAAC,MAAM,0BAA0B,GAAG,sBAAsB,CAAA"}
package/build/index.d.ts CHANGED
@@ -4,6 +4,7 @@ export { ORGANIZATION_REFUSAL, ORGANIZATION_OWNER_REFUSAL } from '@owlmeans/oidc
4
4
  export type { OidcOrganizationItem } from '@owlmeans/oidc';
5
5
  export * from './consts.js';
6
6
  export * from './append.js';
7
+ export type * from './types.js';
7
8
  export * from './consent.js';
8
9
  export * from './login.js';
9
10
  export * from './organization.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,eAAe,CAAA;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAA;AACjF,YAAY,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAC1D,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;AAC1B,cAAc,mBAAmB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,eAAe,CAAA;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAA;AACjF,YAAY,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAC1D,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,mBAAmB,YAAY,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;AAC1B,cAAc,mBAAmB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAA;AAEjF,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;AAC1B,cAAc,mBAAmB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAA;AAEjF,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAE3B,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;AAC1B,cAAc,mBAAmB,CAAA"}
@@ -0,0 +1,11 @@
1
+ export interface ConsentLoginOptions {
2
+ /** The category that must be granted. Defaults to `essential`. */
3
+ category?: string;
4
+ /** Off switch, for an application that genuinely sets no cookie at all. */
5
+ disabled?: boolean;
6
+ }
7
+ export interface AppendIamOptions {
8
+ /** Consent required before a sign-in flow may start. `{ disabled: true }` turns it off. */
9
+ consent?: ConsentLoginOptions;
10
+ }
11
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,mBAAmB;IAClC,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,2FAA2F;IAC3F,OAAO,CAAC,EAAE,mBAAmB,CAAA;CAC9B"}
package/build/types.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import type { AppConfig, AppContext } from '@owlmeans/web-client';
2
+ import type { WithSharedConfig } from '@owlmeans/oidc';
3
+ export type IamClientConfig = AppConfig & WithSharedConfig;
4
+ export type IamClientContext<C extends IamClientConfig = IamClientConfig> = AppContext<C>;
5
+ //# sourceMappingURL=types.local.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.local.d.ts","sourceRoot":"","sources":["../src/types.local.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAEtD,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,gBAAgB,CAAA;AAE1D,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,eAAe,GAAG,eAAe,IAAI,UAAU,CAAC,CAAC,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.local.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.local.js","sourceRoot":"","sources":["../src/types.local.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@owlmeans/client-iam",
3
- "version": "0.1.18-rc.61",
3
+ "version": "0.1.18-rc.62",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -22,18 +22,18 @@
22
22
  }
23
23
  },
24
24
  "dependencies": {
25
- "@owlmeans/client-auth": "^0.1.18-rc.56",
26
- "@owlmeans/consent": "^0.1.18-rc.9",
27
- "@owlmeans/context": "^0.1.18-rc.32",
28
- "@owlmeans/entrypoint": "^0.1.18-rc.39",
29
- "@owlmeans/iam": "^0.1.18-rc.48",
30
- "@owlmeans/oidc": "^0.1.18-rc.53",
31
- "@owlmeans/web-client": "^0.1.18-rc.59",
32
- "@owlmeans/web-oidc-rp": "^0.1.18-rc.62"
25
+ "@owlmeans/client-auth": "^0.1.18-rc.57",
26
+ "@owlmeans/consent": "^0.1.18-rc.10",
27
+ "@owlmeans/context": "^0.1.18-rc.33",
28
+ "@owlmeans/entrypoint": "^0.1.18-rc.40",
29
+ "@owlmeans/iam": "^0.1.18-rc.49",
30
+ "@owlmeans/oidc": "^0.1.18-rc.54",
31
+ "@owlmeans/web-client": "^0.1.18-rc.60",
32
+ "@owlmeans/web-oidc-rp": "^0.1.18-rc.63"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@owlmeans/dep-config": "workspace:*",
36
- "@types/bun": "^1.4.0",
36
+ "@types/bun": "^1.4.2",
37
37
  "nodemon": "^3.1.14",
38
38
  "typescript": "^7.0.2"
39
39
  },
package/src/append.ts CHANGED
@@ -1,16 +1,8 @@
1
- import type { AppConfig, AppContext } from '@owlmeans/web-client'
2
- import type { WithSharedConfig } from '@owlmeans/oidc'
3
1
  import { appendOidcGuard } from '@owlmeans/web-oidc-rp'
4
2
  import { requireConsentForLogin } from './consent.js'
5
- import type { ConsentLoginOptions } from './consent.js'
3
+ import type { IamClientConfig, IamClientContext } from './types.local.js'
4
+ import type { AppendIamOptions } from './types.js'
6
5
 
7
- type IamClientConfig = AppConfig & WithSharedConfig
8
- type IamClientContext<C extends IamClientConfig = IamClientConfig> = AppContext<C>
9
-
10
- export interface AppendIamOptions {
11
- /** Consent required before a sign-in flow may start. `{ disabled: true }` turns it off. */
12
- consent?: ConsentLoginOptions
13
- }
14
6
 
15
7
  /**
16
8
  * One-call OIDC RP setup for a web client context.
package/src/consent.ts CHANGED
@@ -1,15 +1,8 @@
1
1
  import { CONSENT_ESSENTIAL, consentStore } from '@owlmeans/consent'
2
2
  import { ensureLoginService } from '@owlmeans/client-auth/login'
3
3
  import type { BasicContext } from '@owlmeans/context'
4
-
5
- export const CONSENT_LOGIN_PRECONDITION = 'consent-before-login'
6
-
7
- export interface ConsentLoginOptions {
8
- /** The category that must be granted. Defaults to `essential`. */
9
- category?: string
10
- /** Off switch, for an application that genuinely sets no cookie at all. */
11
- disabled?: boolean
12
- }
4
+ import { CONSENT_LOGIN_PRECONDITION } from './consts.js'
5
+ import type { ConsentLoginOptions } from './types.js'
13
6
 
14
7
  /**
15
8
  * Refuse to start a sign-in flow until the required consent category is granted, and open the
package/src/consts.ts CHANGED
@@ -1 +1,3 @@
1
1
  export const CLIENT_IAM_SERVICE = 'client-iam-service'
2
+
3
+ export const CONSENT_LOGIN_PRECONDITION = 'consent-before-login'
package/src/index.ts CHANGED
@@ -4,6 +4,7 @@ export { ORGANIZATION_REFUSAL, ORGANIZATION_OWNER_REFUSAL } from '@owlmeans/oidc
4
4
  export type { OidcOrganizationItem } from '@owlmeans/oidc'
5
5
  export * from './consts.js'
6
6
  export * from './append.js'
7
+ export type * from './types.js'
7
8
  export * from './consent.js'
8
9
  export * from './login.js'
9
10
  export * from './organization.js'
@@ -0,0 +1,6 @@
1
+ import type { AppConfig, AppContext } from '@owlmeans/web-client'
2
+ import type { WithSharedConfig } from '@owlmeans/oidc'
3
+
4
+ export type IamClientConfig = AppConfig & WithSharedConfig
5
+
6
+ export type IamClientContext<C extends IamClientConfig = IamClientConfig> = AppContext<C>
package/src/types.ts ADDED
@@ -0,0 +1,13 @@
1
+
2
+
3
+ export interface ConsentLoginOptions {
4
+ /** The category that must be granted. Defaults to `essential`. */
5
+ category?: string
6
+ /** Off switch, for an application that genuinely sets no cookie at all. */
7
+ disabled?: boolean
8
+ }
9
+
10
+ export interface AppendIamOptions {
11
+ /** Consent required before a sign-in flow may start. `{ disabled: true }` turns it off. */
12
+ consent?: ConsentLoginOptions
13
+ }