fix(deps): update @push.rocks/smartdata and @git.zone/tswatch versions; refactor App and Jwt manager instantiation
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
import type { Reception } from './classes.reception.js';
|
||||
import { App } from './classes.app.js';
|
||||
// Note: App class is imported for use with setDefaultManagerForDoc
|
||||
|
||||
export class AppManager {
|
||||
public receptionRef: Reception;
|
||||
@@ -95,7 +96,7 @@ export class AppManager {
|
||||
const clientSecret = plugins.smartunique.shortId(32);
|
||||
const clientSecretHash = await plugins.smarthash.sha256FromString(clientSecret);
|
||||
|
||||
const app = new App();
|
||||
const app = new this.CApp();
|
||||
app.id = `app-${plugins.smartunique.shortId(8)}`;
|
||||
app.type = 'global';
|
||||
app.data = {
|
||||
@@ -304,7 +305,7 @@ export class AppManager {
|
||||
for (const appData of defaultGlobalApps) {
|
||||
const existing = await this.CApp.getInstance({ id: appData.id });
|
||||
if (!existing) {
|
||||
const app = new App();
|
||||
const app = new this.CApp();
|
||||
app.id = appData.id!;
|
||||
app.type = appData.type!;
|
||||
app.data = appData.data as any;
|
||||
|
||||
@@ -122,7 +122,7 @@ export class JwtManager {
|
||||
|
||||
public async verifyJWTAndGetData(jwtArg: string): Promise<Jwt> {
|
||||
const jwtData: plugins.idpInterfaces.data.IJwt = await this.smartjwtInstance.verifyJWTAndGetData(jwtArg);
|
||||
const jwt = await Jwt.getInstance({
|
||||
const jwt = await this.CJwt.getInstance({
|
||||
id: jwtData.id,
|
||||
});
|
||||
if (jwt.blocked) {
|
||||
|
||||
Reference in New Issue
Block a user