@steedos/service-identity-jwt 3.0.0-beta.2 → 3.0.0-beta.8

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.
@@ -13,8 +13,8 @@ const getUserAgent = (req) => {
13
13
  return userAgent;
14
14
  };
15
15
  class Account {
16
- static ssoLogin(req, res, options = { user: null, err: null, redirect: true, accessToken: null }) {
17
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
16
+ static ssoLogin(req_1, res_1) {
17
+ return tslib_1.__awaiter(this, arguments, void 0, function* (req, res, options = { user: null, err: null, redirect: true, accessToken: null }) {
18
18
  let { user, err } = options;
19
19
  if (err || !user) {
20
20
  (0, objectql_1.getSteedosSchema)().broker.logger.error(`oidc sso login error: ${err}`);
@@ -1,5 +1,5 @@
1
1
  declare const express: any;
2
2
  declare const router: any;
3
- declare const core: any;
3
+ declare const auth: any;
4
4
  declare const objectql: any;
5
5
  declare const jwt: any;
@@ -9,10 +9,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  };
10
10
  const express = require('express');
11
11
  const router = express.Router();
12
- const core = require('@steedos/core');
12
+ const auth = require('@steedos/auth');
13
13
  const objectql = require('@steedos/objectql');
14
14
  const jwt = require('jsonwebtoken');
15
- router.get('/api/external/app/:appId', core.requireAuthentication, function (req, res) {
15
+ router.get('/api/external/app/:appId', auth.requireAuthentication, function (req, res) {
16
16
  return __awaiter(this, void 0, void 0, function* () {
17
17
  try {
18
18
  const userSession = req.user;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos/service-identity-jwt",
3
- "version": "3.0.0-beta.2",
3
+ "version": "3.0.0-beta.8",
4
4
  "main": "package.service.js",
5
5
  "keywords": [
6
6
  "steedos"
@@ -11,7 +11,7 @@
11
11
  "description": "steedos package",
12
12
  "repository": {},
13
13
  "dependencies": {
14
- "@steedos/accounts": "3.0.0-beta.2",
14
+ "@steedos/accounts": "3.0.0-beta.8",
15
15
  "express": "4.18.1",
16
16
  "jsonwebtoken": "8.5.1",
17
17
  "passport": "^0.6.0",
@@ -22,5 +22,5 @@
22
22
  "publishConfig": {
23
23
  "access": "public"
24
24
  },
25
- "gitHead": "72fa51bda8ff714d5fdb933bf0a45ea4cb82df74"
25
+ "gitHead": "723d92765db5342a374c7aacb5b835e69f77ca4b"
26
26
  }
@@ -2,16 +2,16 @@
2
2
  * @Author: sunhaolin@hotoa.com
3
3
  * @Date: 2022-11-23 15:54:33
4
4
  * @LastEditors: baozhoutao@steedos.com
5
- * @LastEditTime: 2022-11-28 17:59:06
5
+ * @LastEditTime: 2025-01-21 17:28:04
6
6
  * @Description: 新增jwt 接口(GET), 所有第三方应用都通过此接口转发出去, 自动带上 jwt 加密(app.secret)后的数据,比如username、email等.
7
7
  */
8
8
  const express = require('express');
9
9
  const router =express.Router();
10
- const core = require('@steedos/core');
10
+ const auth = require('@steedos/auth');
11
11
  const objectql = require('@steedos/objectql')
12
12
  const jwt = require('jsonwebtoken')
13
13
 
14
- router.get('/api/external/app/:appId', core.requireAuthentication, async function (req, res) {
14
+ router.get('/api/external/app/:appId', auth.requireAuthentication, async function (req, res) {
15
15
  try {
16
16
  const userSession = req.user;
17
17
  // const spaceId = userSession.spaceId;