@aooth/user 0.1.58 → 0.1.59

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.
@@ -1,5 +1,4 @@
1
- import { D as UserCredentials, i as NewFederatedIdentity, k as UserStoreUpdate, n as FederatedIdentityStore, o as UserStore, r as FederatedProfileSnapshot, s as WithCasOptions, t as FederatedIdentity } from "./federated-identity-store-I0uyqf2M.cjs";
2
-
1
+ import { D as UserCredentials, i as NewFederatedIdentity, k as UserStoreUpdate, n as FederatedIdentityStore, o as UserStore, r as FederatedProfileSnapshot, s as WithCasOptions, t as FederatedIdentity } from "./federated-identity-store-COXONHvx.cjs";
3
2
  //#region src/atscript-db/federated-identity-store.d.ts
4
3
  /**
5
4
  * Structural surface of `AtscriptDbTable` covering exactly the methods this
@@ -1,5 +1,4 @@
1
- import { D as UserCredentials, i as NewFederatedIdentity, k as UserStoreUpdate, n as FederatedIdentityStore, o as UserStore, r as FederatedProfileSnapshot, s as WithCasOptions, t as FederatedIdentity } from "./federated-identity-store-I0uyqf2M.mjs";
2
-
1
+ import { D as UserCredentials, i as NewFederatedIdentity, k as UserStoreUpdate, n as FederatedIdentityStore, o as UserStore, r as FederatedProfileSnapshot, s as WithCasOptions, t as FederatedIdentity } from "./federated-identity-store-COXONHvx.mjs";
3
2
  //#region src/atscript-db/federated-identity-store.d.ts
4
3
  /**
5
4
  * Structural surface of `AtscriptDbTable` covering exactly the methods this
@@ -108,7 +108,8 @@ interface UserServiceConfig {
108
108
  * payload — is called; the methods throw clearly when invoked without it.
109
109
  */
110
110
  deviceTrust?: {
111
- /** HMAC-SHA256 signing secret for trust-device and seen-device (recognition) tokens. */secret: string;
111
+ /** HMAC-SHA256 signing secret for trust-device and seen-device (recognition) tokens. */
112
+ secret: string;
112
113
  };
113
114
  /**
114
115
  * Name of the consumer's `@aooth.user.email`-annotated column (resolved at
@@ -179,7 +180,7 @@ interface PasswordPolicyInstance extends PasswordPolicyDef {
179
180
  evaluate(password: string, context?: PasswordPolicyContext): boolean | Promise<boolean>;
180
181
  transferable: boolean;
181
182
  }
182
- type DeepPartial<T> = { [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P] };
183
+ type DeepPartial<T> = { [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P]; };
183
184
  interface UserStoreUpdate {
184
185
  /** Partial object with fields to set (deep-merged) */
185
186
  set?: DeepPartial<UserCredentials>;
@@ -108,7 +108,8 @@ interface UserServiceConfig {
108
108
  * payload — is called; the methods throw clearly when invoked without it.
109
109
  */
110
110
  deviceTrust?: {
111
- /** HMAC-SHA256 signing secret for trust-device and seen-device (recognition) tokens. */secret: string;
111
+ /** HMAC-SHA256 signing secret for trust-device and seen-device (recognition) tokens. */
112
+ secret: string;
112
113
  };
113
114
  /**
114
115
  * Name of the consumer's `@aooth.user.email`-annotated column (resolved at
@@ -179,7 +180,7 @@ interface PasswordPolicyInstance extends PasswordPolicyDef {
179
180
  evaluate(password: string, context?: PasswordPolicyContext): boolean | Promise<boolean>;
180
181
  transferable: boolean;
181
182
  }
182
- type DeepPartial<T> = { [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P] };
183
+ type DeepPartial<T> = { [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P]; };
183
184
  interface UserStoreUpdate {
184
185
  /** Partial object with fields to set (deep-merged) */
185
186
  set?: DeepPartial<UserCredentials>;
package/dist/index.cjs CHANGED
@@ -184,7 +184,8 @@ var PasswordHasher = class {
184
184
  r: this.r,
185
185
  p: this.p
186
186
  });
187
- return `${PREFIX}${`N=${this.N},r=${this.r},p=${this.p},l=${this.keyLength}`}$${salt.toString("base64url")}$${derived.toString("base64url")}`;
187
+ const params = `N=${this.N},r=${this.r},p=${this.p},l=${this.keyLength}`;
188
+ return `${PREFIX}${params}$${salt.toString("base64url")}$${derived.toString("base64url")}`;
188
189
  }
189
190
  async verify(password, encoded) {
190
191
  const parsed = parseHash(encoded);
package/dist/index.d.cts CHANGED
@@ -1,5 +1,4 @@
1
- import { C as TotpConfig, D as UserCredentials, E as UserAuthErrorType, O as UserServiceConfig, S as PolicyCheckResult, T as TrustedDeviceRecord, _ as PasswordData, a as pickDefinedProfile, b as PasswordPolicyEvalFn, c as AccountData, d as LockoutConfig, f as LoginResult, g as PasswordConfig, h as MfaMethodInfo, i as NewFederatedIdentity, k as UserStoreUpdate, l as DeepPartial, m as MfaMethod, n as FederatedIdentityStore, o as UserStore, p as MfaData, r as FederatedProfileSnapshot, s as WithCasOptions, t as FederatedIdentity, u as LockStatus, v as PasswordPolicyContext, w as TransferablePolicy, x as PasswordPolicyInstance, y as PasswordPolicyDef } from "./federated-identity-store-I0uyqf2M.cjs";
2
-
1
+ import { C as TotpConfig, D as UserCredentials, E as UserAuthErrorType, O as UserServiceConfig, S as PolicyCheckResult, T as TrustedDeviceRecord, _ as PasswordData, a as pickDefinedProfile, b as PasswordPolicyEvalFn, c as AccountData, d as LockoutConfig, f as LoginResult, g as PasswordConfig, h as MfaMethodInfo, i as NewFederatedIdentity, k as UserStoreUpdate, l as DeepPartial, m as MfaMethod, n as FederatedIdentityStore, o as UserStore, p as MfaData, r as FederatedProfileSnapshot, s as WithCasOptions, t as FederatedIdentity, u as LockStatus, v as PasswordPolicyContext, w as TransferablePolicy, x as PasswordPolicyInstance, y as PasswordPolicyDef } from "./federated-identity-store-COXONHvx.cjs";
3
2
  //#region src/errors.d.ts
4
3
  declare class UserAuthError extends Error {
5
4
  readonly type: UserAuthErrorType;
package/dist/index.d.mts CHANGED
@@ -1,5 +1,4 @@
1
- import { C as TotpConfig, D as UserCredentials, E as UserAuthErrorType, O as UserServiceConfig, S as PolicyCheckResult, T as TrustedDeviceRecord, _ as PasswordData, a as pickDefinedProfile, b as PasswordPolicyEvalFn, c as AccountData, d as LockoutConfig, f as LoginResult, g as PasswordConfig, h as MfaMethodInfo, i as NewFederatedIdentity, k as UserStoreUpdate, l as DeepPartial, m as MfaMethod, n as FederatedIdentityStore, o as UserStore, p as MfaData, r as FederatedProfileSnapshot, s as WithCasOptions, t as FederatedIdentity, u as LockStatus, v as PasswordPolicyContext, w as TransferablePolicy, x as PasswordPolicyInstance, y as PasswordPolicyDef } from "./federated-identity-store-I0uyqf2M.mjs";
2
-
1
+ import { C as TotpConfig, D as UserCredentials, E as UserAuthErrorType, O as UserServiceConfig, S as PolicyCheckResult, T as TrustedDeviceRecord, _ as PasswordData, a as pickDefinedProfile, b as PasswordPolicyEvalFn, c as AccountData, d as LockoutConfig, f as LoginResult, g as PasswordConfig, h as MfaMethodInfo, i as NewFederatedIdentity, k as UserStoreUpdate, l as DeepPartial, m as MfaMethod, n as FederatedIdentityStore, o as UserStore, p as MfaData, r as FederatedProfileSnapshot, s as WithCasOptions, t as FederatedIdentity, u as LockStatus, v as PasswordPolicyContext, w as TransferablePolicy, x as PasswordPolicyInstance, y as PasswordPolicyDef } from "./federated-identity-store-COXONHvx.mjs";
3
2
  //#region src/errors.d.ts
4
3
  declare class UserAuthError extends Error {
5
4
  readonly type: UserAuthErrorType;
package/dist/index.mjs CHANGED
@@ -183,7 +183,8 @@ var PasswordHasher = class {
183
183
  r: this.r,
184
184
  p: this.p
185
185
  });
186
- return `${PREFIX}${`N=${this.N},r=${this.r},p=${this.p},l=${this.keyLength}`}$${salt.toString("base64url")}$${derived.toString("base64url")}`;
186
+ const params = `N=${this.N},r=${this.r},p=${this.p},l=${this.keyLength}`;
187
+ return `${PREFIX}${params}$${salt.toString("base64url")}$${derived.toString("base64url")}`;
187
188
  }
188
189
  async verify(password, encoded) {
189
190
  const parsed = parseHash(encoded);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aooth/user",
3
- "version": "0.1.58",
3
+ "version": "0.1.59",
4
4
  "description": "User credential primitives for aoothjs",
5
5
  "keywords": [
6
6
  "aoothjs",
@@ -60,14 +60,14 @@
60
60
  "access": "public"
61
61
  },
62
62
  "devDependencies": {
63
- "@atscript/core": "^0.1.85",
64
- "@atscript/db": "^0.1.124",
65
- "@atscript/db-sql-tools": "^0.1.124",
66
- "@atscript/db-sqlite": "^0.1.124",
67
- "@atscript/typescript": "^0.1.85",
63
+ "@atscript/core": "^0.1.86",
64
+ "@atscript/db": "^0.1.125",
65
+ "@atscript/db-sql-tools": "^0.1.125",
66
+ "@atscript/db-sqlite": "^0.1.125",
67
+ "@atscript/typescript": "^0.1.86",
68
68
  "@types/better-sqlite3": "^7.6.13",
69
69
  "better-sqlite3": "^12.6.2",
70
- "unplugin-atscript": "^0.1.85"
70
+ "unplugin-atscript": "^0.1.86"
71
71
  },
72
72
  "peerDependencies": {
73
73
  "@atscript/db": ">=0.1.79"