diff --git a/README.md b/README.md index f7c16b5..314a0ba 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ It is suggested to use [socket class](https://github.com/ioBroker/socket-client) --> ## Changelog -### 3.0.9 (2025-02-24) +### **WORK IN PROGRESS** * (@GermanBluefox) Added OAuth2 authentication ### 3.0.5 (2025-02-11) diff --git a/dist/lib/socketWS.js b/dist/lib/socketWS.js index c5bd01c..4bc52f5 100644 --- a/dist/lib/socketWS.js +++ b/dist/lib/socketWS.js @@ -118,7 +118,7 @@ class SocketWS extends socket_classes_1.SocketCommon { callback('Cannot detect user'); } else { - callback(null, obj.user ? `system.user.${obj.user}` : '', obj.exp); + callback(null, obj.user ? `system.user.${obj.user}` : '', obj.aExp); } }); wait = true; @@ -233,7 +233,7 @@ class SocketWS extends socket_classes_1.SocketCommon { this.adapter.log.error('No session found'); } else { - socket._sessionExpiresAt = tokenData.exp; + socket._sessionExpiresAt = tokenData.aExp; } }); } diff --git a/dist/lib/socketWS.js.map b/dist/lib/socketWS.js.map index f34bca9..a467083 100644 --- a/dist/lib/socketWS.js.map +++ b/dist/lib/socketWS.js.map @@ -1 +1 @@ -{"version":3,"file":"socketWS.js","sourceRoot":"","sources":["../../src/lib/socketWS.ts"],"names":[],"mappings":";;;;;;AAAA,6DAMkC;AAElC,wDAAgC;AAChC,kEAAyC;AAUzC,uDAAuD;AACvD,MAAa,QAAS,SAAQ,6BAAY;IACtC,mBAAmB;QACf,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,mBAAmB,GAAG,CAAC,IAAyB,EAAE,MAA8B,EAAQ,EAAE;QACtF,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAClB,2CAA2C,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC,aAAa,EAAE,CAC9F,CAAC;QACF,WAAW;QACX,MAAM,CAAC,KAAK,CAAC,CAAC;IAClB,CAAC,CAAC;IAEF,gBAAgB,GAAG,CACf,IAAyB,EACzB,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AC,OAAO,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC;YAE7E,mCAAmC;YACnC,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;gBAC3B,IAAI,MAAM,CAAC,EAAE,KAAK,GAAG,EAAE,CAAC;oBACpB,IAAI,IAAI,CAAC,sBAAsB,CAAC,MAAM,EAAE,cAAc,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE,CAAC;wBACzE,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;oBACjC,CAAC;gBACL,CAAC;YACL,CAAC;QACL,CAAC;IACL,CAAC;CACJ;AAnXD,4BAmXC"} \ No newline at end of file diff --git a/dist/main.js b/dist/main.js index 0aae8e7..40a0f09 100644 --- a/dist/main.js +++ b/dist/main.js @@ -183,7 +183,7 @@ class WsAdapter extends adapter_core_1.Adapter { this.server.app.use((req, res, next) => { const url = req.url.split('?')[0]; if (url === '/auth') { - // User can asc server if authentication enabled + // User can ask server if authentication enabled res.setHeader('Content-Type', 'application/json'); res.json({ auth: this.config.auth }); } diff --git a/dist/main.js.map b/dist/main.js.map index 5b18b4d..bdf6719 100644 --- a/dist/main.js.map +++ b/dist/main.js.map @@ -1 +1 @@ -{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA0C;AAG1C,qCAAuC;AAEvC,yDAA2C;AAC3C,sDAAyF;AACzF,wDAA0C;AAC1C,kEAAyC;AAEzC,yDAA+F,CAAC,2BAA2B;AAC3H,mDAAoE;AACpE,mDAA+C;AAI/C,6CAA0C;AAI1C,MAAa,SAAU,SAAQ,sBAAO;IAE1B,MAAM,GAIV;QACA,MAAM,EAAE,IAAI;QACZ,EAAE,EAAE,IAAI;QACR,GAAG,EAAE,IAAI;KACZ,CAAC;IACe,YAAY,CAAS;IAC9B,KAAK,GAAiB,IAAI,CAAC;IAC3B,MAAM,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ACzB,CAAC;CACJ;AApUD,8BAoUC;AAED,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;IAC1B,yCAAyC;IACzC,MAAM,CAAC,OAAO,GAAG,CAAC,OAA4C,EAAE,EAAE,CAAC,IAAI,SAAS,CAAC,OAAO,CAAC,CAAC;AAC9F,CAAC;KAAM,CAAC;IACJ,wCAAwC;IACxC,CAAC,GAAG,EAAE,CAAC,IAAI,SAAS,EAAE,CAAC,EAAE,CAAC;AAC9B,CAAC"} \ No newline at end of file diff --git a/io-package.json b/io-package.json index 86f5e54..749d1e4 100644 --- a/io-package.json +++ b/io-package.json @@ -29,58 +29,6 @@ "zh-cn": "该适配器允许与ioBroker通信不同的Web应用程序" }, "news": { - "3.0.9": { - "en": "Added OAuth2 authentication", - "de": "OAuth2 Authentifizierung hinzugefügt", - "ru": "Проверка подлинности OAuth2", - "pt": "Autenticação de OAuth2 adicionada", - "nl": "OAuth2-authenticatie toegevoegd", - "fr": "Ajout de l'authentification OAuth2", - "it": "Aggiunta autenticazione OAuth2", - "es": "Autenticación OAuth2", - "pl": "Dodano uwierzytelnianie OAuth2", - "uk": "Додано автентифікацію OAuth2", - "zh-cn": "添加 OAuth2 认证" - }, - "3.0.8": { - "en": "Added OAuth2 authentication", - "de": "OAuth2 Authentifizierung hinzugefügt", - "ru": "Проверка подлинности OAuth2", - "pt": "Autenticação de OAuth2 adicionada", - "nl": "OAuth2-authenticatie toegevoegd", - "fr": "Ajout de l'authentification OAuth2", - "it": "Aggiunta autenticazione OAuth2", - "es": "Autenticación OAuth2", - "pl": "Dodano uwierzytelnianie OAuth2", - "uk": "Додано автентифікацію OAuth2", - "zh-cn": "添加 OAuth2 认证" - }, - "3.0.7": { - "en": "Added OAuth2 authentication", - "de": "OAuth2 Authentifizierung hinzugefügt", - "ru": "Проверка подлинности OAuth2", - "pt": "Autenticação de OAuth2 adicionada", - "nl": "OAuth2-authenticatie toegevoegd", - "fr": "Ajout de l'authentification OAuth2", - "it": "Aggiunta autenticazione OAuth2", - "es": "Autenticación OAuth2", - "pl": "Dodano uwierzytelnianie OAuth2", - "uk": "Додано автентифікацію OAuth2", - "zh-cn": "添加 OAuth2 认证" - }, - "3.0.6": { - "en": "Added OAuth2 authentication", - "de": "OAuth2 Authentifizierung hinzugefügt", - "ru": "Проверка подлинности OAuth2", - "pt": "Autenticação de OAuth2 adicionada", - "nl": "OAuth2-authenticatie toegevoegd", - "fr": "Ajout de l'authentification OAuth2", - "it": "Aggiunta autenticazione OAuth2", - "es": "Autenticación OAuth2", - "pl": "Dodano uwierzytelnianie OAuth2", - "uk": "Додано автентифікацію OAuth2", - "zh-cn": "添加 OAuth2 认证" - }, "3.0.5": { "en": "Corrected address detection\nCorrected language settings", "de": "Korrigierte Adresserkennung\nKorrigierte Spracheinstellungen", diff --git a/package.json b/package.json index 8bc35a0..d38b795 100644 --- a/package.json +++ b/package.json @@ -20,8 +20,8 @@ }, "dependencies": { "@iobroker/adapter-core": "^3.2.3", - "@iobroker/socket-classes": "^2.1.9", - "@iobroker/webserver": "^1.1.3", + "@iobroker/socket-classes": "^2.1.10", + "@iobroker/webserver": "^1.1.6", "@iobroker/ws-server": "^4.2.9", "body-parser": "^1.20.3", "cookie-parser": "^1.4.7", diff --git a/src/lib/socketWS.ts b/src/lib/socketWS.ts index 5f0303f..9faefa9 100644 --- a/src/lib/socketWS.ts +++ b/src/lib/socketWS.ts @@ -4,6 +4,7 @@ import { type PassportHttpRequest, type Store, type SocketSubscribeTypes, + type InternalStorageToken, } from '@iobroker/socket-classes'; import type { Socket as WebSocketClient } from '@iobroker/ws-server'; import passport from 'passport'; @@ -11,12 +12,6 @@ import cookieParser from 'cookie-parser'; import type { AddressInfo } from 'node:net'; import type { WsAdapterConfig } from '../types'; -interface InternalStorageToken { - token: string; - exp: number; - user: string; -} - // From settings used only secure, auth and crossDomain export class SocketWS extends SocketCommon { __getIsNoDisconnect(): boolean { @@ -161,7 +156,7 @@ export class SocketWS extends SocketCommon { socket.emit(SocketCommon.COMMAND_RE_AUTHENTICATE); callback('Cannot detect user'); } else { - callback(null, obj.user ? `system.user.${obj.user}` : '', obj.exp); + callback(null, obj.user ? `system.user.${obj.user}` : '', obj.aExp); } }); wait = true; @@ -301,7 +296,7 @@ export class SocketWS extends SocketCommon { } else if (!tokenData?.user) { this.adapter.log.error('No session found'); } else { - socket._sessionExpiresAt = tokenData.exp; + socket._sessionExpiresAt = tokenData.aExp; } }); } diff --git a/src/main.ts b/src/main.ts index c769d3c..2188f50 100644 --- a/src/main.ts +++ b/src/main.ts @@ -4,7 +4,7 @@ import type { Server as HttpsServer } from 'node:https'; import { readFileSync } from 'node:fs'; import * as session from 'express-session'; -import express, {type Express, NextFunction, type Request, type Response} from 'express'; +import express, { type Express, type NextFunction, type Request, type Response } from 'express'; import * as bodyParser from 'body-parser'; import cookieParser from 'cookie-parser'; @@ -184,7 +184,7 @@ export class WsAdapter extends Adapter { this.server.app.use((req: Request, res: Response, next: NextFunction): void => { const url = req.url.split('?')[0]; if (url === '/auth') { - // User can asc server if authentication enabled + // User can ask server if authentication enabled res.setHeader('Content-Type', 'application/json'); res.json({ auth: this.config.auth }); } else if (