@owlmeans/server-auth-identity 0.1.5 → 0.1.6

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/build/iam.d.ts CHANGED
@@ -1,4 +1,22 @@
1
+ import type { AuthPayload } from '@owlmeans/auth';
2
+ /** Find-or-create an end-user identity scoped to an entity by email address.
3
+ *
4
+ * Used by the OTP auth plugin: after code verification, look up whether this
5
+ * email already has a profile under the entity and create one if not.
6
+ */
7
+ export interface EmailIdentityArgs {
8
+ email: string;
9
+ /** The entity (project owner) this login is scoped to */
10
+ entityId?: string;
11
+ /** Human-readable display name (defaults to email) */
12
+ username?: string;
13
+ }
14
+ /** Result matches AuthPayload so it can be embedded directly in the credential. */
15
+ export type EmailIdentityPayload = AuthPayload;
1
16
  /** Extension seam for IAM-backed identity operations — Phase 2 fills this */
2
17
  export interface IdentityIamExtension {
18
+ /** Inputs and result types for the email find-or-create path */
19
+ EmailIdentityArgs: EmailIdentityArgs;
20
+ EmailIdentityPayload: EmailIdentityPayload;
3
21
  }
4
22
  //# sourceMappingURL=iam.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"iam.d.ts","sourceRoot":"","sources":["../src/iam.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,MAAM,WAAW,oBAAoB;CAEpC"}
1
+ {"version":3,"file":"iam.d.ts","sourceRoot":"","sources":["../src/iam.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAEjD;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAA;IACb,yDAAyD;IACzD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,sDAAsD;IACtD,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,mFAAmF;AACnF,MAAM,MAAM,oBAAoB,GAAG,WAAW,CAAA;AAE9C,6EAA6E;AAC7E,MAAM,WAAW,oBAAoB;IACnC,gEAAgE;IAChE,iBAAiB,EAAE,iBAAiB,CAAA;IACpC,oBAAoB,EAAE,oBAAoB,CAAA;CAC3C"}
package/build/index.d.ts CHANGED
@@ -3,5 +3,5 @@ export type * from './types.js';
3
3
  export * from './resource.js';
4
4
  export * from './service.js';
5
5
  export * from './helper.js';
6
- export type * from './iam.js';
6
+ export * from './iam.js';
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,mBAAmB,YAAY,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,mBAAmB,UAAU,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,mBAAmB,YAAY,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,UAAU,CAAA"}
package/build/index.js CHANGED
@@ -2,4 +2,5 @@ export * from './consts.js';
2
2
  export * from './resource.js';
3
3
  export * from './service.js';
4
4
  export * from './helper.js';
5
+ export * from './iam.js';
5
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAE3B,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAE3B,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,UAAU,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@owlmeans/server-auth-identity",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -22,13 +22,13 @@
22
22
  }
23
23
  },
24
24
  "dependencies": {
25
- "@owlmeans/auth": "^0.1.5",
26
- "@owlmeans/basic-ids": "^0.1.5",
27
- "@owlmeans/context": "^0.1.5",
28
- "@owlmeans/mongo-resource": "^0.1.5",
29
- "@owlmeans/oidc": "^0.1.5",
30
- "@owlmeans/resource": "^0.1.5",
31
- "@owlmeans/server-context": "^0.1.5"
25
+ "@owlmeans/auth": "^0.1.6",
26
+ "@owlmeans/basic-ids": "^0.1.6",
27
+ "@owlmeans/context": "^0.1.6",
28
+ "@owlmeans/mongo-resource": "^0.1.6",
29
+ "@owlmeans/oidc": "^0.1.6",
30
+ "@owlmeans/resource": "^0.1.6",
31
+ "@owlmeans/server-context": "^0.1.6"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "mongodb": "*"
package/src/iam.ts CHANGED
@@ -1,4 +1,24 @@
1
+ import type { AuthPayload } from '@owlmeans/auth'
2
+
3
+ /** Find-or-create an end-user identity scoped to an entity by email address.
4
+ *
5
+ * Used by the OTP auth plugin: after code verification, look up whether this
6
+ * email already has a profile under the entity and create one if not.
7
+ */
8
+ export interface EmailIdentityArgs {
9
+ email: string
10
+ /** The entity (project owner) this login is scoped to */
11
+ entityId?: string
12
+ /** Human-readable display name (defaults to email) */
13
+ username?: string
14
+ }
15
+
16
+ /** Result matches AuthPayload so it can be embedded directly in the credential. */
17
+ export type EmailIdentityPayload = AuthPayload
18
+
1
19
  /** Extension seam for IAM-backed identity operations — Phase 2 fills this */
2
20
  export interface IdentityIamExtension {
3
- // Reserved: entityId-scoped account creation, cross-entity user listing
21
+ /** Inputs and result types for the email find-or-create path */
22
+ EmailIdentityArgs: EmailIdentityArgs
23
+ EmailIdentityPayload: EmailIdentityPayload
4
24
  }
package/src/index.ts CHANGED
@@ -3,4 +3,4 @@ export type * from './types.js'
3
3
  export * from './resource.js'
4
4
  export * from './service.js'
5
5
  export * from './helper.js'
6
- export type * from './iam.js'
6
+ export * from './iam.js'