entropic-bond 1.30.0 → 1.31.1
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/lib/index.d.ts
CHANGED
|
@@ -14,4 +14,5 @@ export * from './auth/user-auth-types';
|
|
|
14
14
|
export * from './auth/auth-mock';
|
|
15
15
|
export * from './cloud-functions/cloud-functions';
|
|
16
16
|
export * from './cloud-functions/cloud-functions-mock';
|
|
17
|
+
export * from './server-auth/server-auth';
|
|
17
18
|
export * from './utils/utils';
|
package/lib/index.js
CHANGED
|
@@ -30,5 +30,6 @@ __exportStar(require("./auth/user-auth-types"), exports);
|
|
|
30
30
|
__exportStar(require("./auth/auth-mock"), exports);
|
|
31
31
|
__exportStar(require("./cloud-functions/cloud-functions"), exports);
|
|
32
32
|
__exportStar(require("./cloud-functions/cloud-functions-mock"), exports);
|
|
33
|
+
__exportStar(require("./server-auth/server-auth"), exports);
|
|
33
34
|
__exportStar(require("./utils/utils"), exports);
|
|
34
35
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAuC;AACvC,kEAA+C;AAC/C,0DAAuC;AACvC,sDAAmC;AACnC,2DAAwC;AACxC,gDAA6B;AAC7B,gDAA6B;AAC7B,wDAAqC;AACrC,gEAA6C;AAC7C,qEAAkD;AAClD,8DAA2C;AAC3C,8CAA2B;AAC3B,yDAAsC;AACtC,mDAAgC;AAChC,oEAAiD;AACjD,yEAAsD;AACtD,gDAA6B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAuC;AACvC,kEAA+C;AAC/C,0DAAuC;AACvC,sDAAmC;AACnC,2DAAwC;AACxC,gDAA6B;AAC7B,gDAA6B;AAC7B,wDAAqC;AACrC,gEAA6C;AAC7C,qEAAkD;AAClD,8DAA2C;AAC3C,8CAA2B;AAC3B,yDAAsC;AACtC,mDAAgC;AAChC,oEAAiD;AACjD,yEAAsD;AACtD,4DAAyC;AACzC,gDAA6B"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { UserCredentials } from '../auth/user-auth-types';
|
|
2
|
+
export interface CustomCredentials {
|
|
3
|
+
[key: string]: unknown;
|
|
4
|
+
}
|
|
5
|
+
export declare abstract class ServerAuthService {
|
|
6
|
+
abstract setCustomCredentials(userId: string, customCredentials: CustomCredentials): Promise<void>;
|
|
7
|
+
abstract getUser(userId: string): Promise<UserCredentials>;
|
|
8
|
+
abstract updateUser(userId: string, credentials: UserCredentials): Promise<UserCredentials>;
|
|
9
|
+
}
|
|
10
|
+
export declare class ServerAuth extends ServerAuthService {
|
|
11
|
+
protected constructor();
|
|
12
|
+
static registerserverAuthService(authService: ServerAuthService): void;
|
|
13
|
+
static get instance(): ServerAuth;
|
|
14
|
+
getUser(userId: string): Promise<UserCredentials>;
|
|
15
|
+
updateUser(userId: string, credentials: UserCredentials): Promise<UserCredentials>;
|
|
16
|
+
setCustomCredentials(userId: string, customCredentials: CustomCredentials): Promise<void>;
|
|
17
|
+
private static _instance;
|
|
18
|
+
private static _authService;
|
|
19
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ServerAuth = exports.ServerAuthService = void 0;
|
|
4
|
+
class ServerAuthService {
|
|
5
|
+
}
|
|
6
|
+
exports.ServerAuthService = ServerAuthService;
|
|
7
|
+
class ServerAuth extends ServerAuthService {
|
|
8
|
+
constructor() { super(); }
|
|
9
|
+
static registerserverAuthService(authService) {
|
|
10
|
+
if (ServerAuth._authService != authService) {
|
|
11
|
+
ServerAuth._authService = authService;
|
|
12
|
+
this._instance = undefined;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
static get instance() {
|
|
16
|
+
return this._instance || (this._instance = new this());
|
|
17
|
+
}
|
|
18
|
+
getUser(userId) {
|
|
19
|
+
return ServerAuth._authService.getUser(userId);
|
|
20
|
+
}
|
|
21
|
+
updateUser(userId, credentials) {
|
|
22
|
+
return ServerAuth._authService.updateUser(userId, credentials);
|
|
23
|
+
}
|
|
24
|
+
setCustomCredentials(userId, customCredentials) {
|
|
25
|
+
return ServerAuth._authService.setCustomCredentials(userId, customCredentials);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.ServerAuth = ServerAuth;
|
|
29
|
+
ServerAuth._instance = null;
|
|
30
|
+
//# sourceMappingURL=server-auth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-auth.js","sourceRoot":"","sources":["../../src/server-auth/server-auth.ts"],"names":[],"mappings":";;;AAMA,MAAsB,iBAAiB;CAItC;AAJD,8CAIC;AAED,MAAa,UAAW,SAAQ,iBAAiB;IAChD,gBAAyB,KAAK,EAAE,CAAA,CAAC,CAAC;IAElC,MAAM,CAAC,yBAAyB,CAAE,WAA8B;QAC/D,IAAK,UAAU,CAAC,YAAY,IAAI,WAAW,EAAG;YAC7C,UAAU,CAAC,YAAY,GAAG,WAAW,CAAA;YACrC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;SAC1B;IACF,CAAC;IAED,MAAM,KAAK,QAAQ;QAClB,OAAO,IAAI,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,IAAI,IAAI,EAAE,CAAE,CAAA;IACxD,CAAC;IAED,OAAO,CAAE,MAAc;QACtB,OAAO,UAAU,CAAC,YAAY,CAAC,OAAO,CAAE,MAAM,CAAE,CAAA;IACjD,CAAC;IAED,UAAU,CAAE,MAAc,EAAE,WAA4B;QACvD,OAAO,UAAU,CAAC,YAAY,CAAC,UAAU,CAAE,MAAM,EAAE,WAAW,CAAE,CAAA;IACjE,CAAC;IAED,oBAAoB,CAAE,MAAc,EAAE,iBAAoC;QACzE,OAAO,UAAU,CAAC,YAAY,CAAC,oBAAoB,CAAE,MAAM,EAAE,iBAAiB,CAAE,CAAA;IACjF,CAAC;;AAxBF,gCA4BC;AAFe,oBAAS,GAAe,IAAI,CAAA"}
|