@steedos/service-identity-jwt 2.3.1-beta.6 → 2.3.2-beta.10
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,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const express = require("express");
|
|
5
4
|
const account_1 = require("./account");
|
|
6
5
|
const passport = require('passport');
|
|
7
|
-
const router =
|
|
6
|
+
const router = require('@steedos/router').staticRouter();
|
|
8
7
|
router.use('/accounts/jwt/login', passport.authenticate('jwt', { session: false }), (req, res) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
9
8
|
account_1.Account.ssoLogin(req, res, { err: null, user: req.user, redirect: false, accessToken: null }).then((loginResult) => {
|
|
10
9
|
delete loginResult.user.services;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/service-identity-jwt",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.2-beta.10",
|
|
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": "2.3.
|
|
14
|
+
"@steedos/accounts": "2.3.2-beta.10",
|
|
15
15
|
"express": "4.18.1",
|
|
16
16
|
"passport": "^0.6.0",
|
|
17
17
|
"passport-jwt": "^4.0.0"
|
|
@@ -21,5 +21,5 @@
|
|
|
21
21
|
"publishConfig": {
|
|
22
22
|
"access": "public"
|
|
23
23
|
},
|
|
24
|
-
"gitHead": "
|
|
24
|
+
"gitHead": "44b1617fea53eb016e82e72174e1d33bdbfe3fd1"
|
|
25
25
|
}
|
|
@@ -2,14 +2,13 @@
|
|
|
2
2
|
* @Author: baozhoutao@steedos.com
|
|
3
3
|
* @Date: 2022-06-08 23:28:39
|
|
4
4
|
* @LastEditors: baozhoutao@steedos.com
|
|
5
|
-
* @LastEditTime: 2022-
|
|
5
|
+
* @LastEditTime: 2022-11-16 14:19:32
|
|
6
6
|
* @Description:
|
|
7
7
|
*/
|
|
8
|
-
import * as express from 'express';
|
|
9
8
|
import { Account } from './account'
|
|
10
9
|
const passport = require('passport');
|
|
11
10
|
|
|
12
|
-
const router =
|
|
11
|
+
const router =require('@steedos/router').staticRouter()
|
|
13
12
|
|
|
14
13
|
router.use('/accounts/jwt/login', passport.authenticate('jwt', { session: false }), async (req: any, res) => {
|
|
15
14
|
Account.ssoLogin(req, res, { err: null, user: req.user, redirect: false, accessToken: null }).then((loginResult) => {
|