fix(多租户管理):clientId和clientSecret配置原理梳理,租户数据隔离和数据权限隔离等

This commit is contained in:
2025-04-11 15:38:04 +08:00
parent 8b94bf212b
commit 7f0e7d8a1e
13 changed files with 35 additions and 255 deletions
@@ -9,43 +9,43 @@
export default {
dev: {
'/api-uaa/': {
target: 'http://119.45.169.13:9900',
// target: 'http://127.0.0.1:9900',
// target: 'http://119.45.169.13:9900',
target: 'http://127.0.0.1:9900',
changeOrigin: true,
},
'/api-user/': {
// target: 'http://127.0.0.1:9900',
target: 'http://119.45.169.13:9900',
target: 'http://127.0.0.1:9900',
// target: 'http://119.45.169.13:9900',
changeOrigin: true,
},
'/api-log/': {
// target: 'http://127.0.0.1:9900',
target: 'http://119.45.169.13:9900',
target: 'http://127.0.0.1:9900',
// target: 'http://119.45.169.13:9900',
changeOrigin: true,
},
'/api-search/': {
// target: 'http://127.0.0.1:9900',
target: 'http://119.45.169.13:9900',
target: 'http://127.0.0.1:9900',
// target: 'http://119.45.169.13:9900',
changeOrigin: true,
},
'/api-generator/': {
// target: 'http://127.0.0.1:9900',
target: 'http://119.45.169.13:9900',
target: 'http://127.0.0.1:9900',
// target: 'http://119.45.169.13:9900',
changeOrigin: true,
},
'/api-file/': {
// target: 'http://127.0.0.1:9900',
target: 'http://119.45.169.13:9900',
target: 'http://127.0.0.1:9900',
// target: 'http://119.45.169.13:9900',
changeOrigin: true,
},
'/api-order/': {
// target: 'http://127.0.0.1:9900',
target: 'http://119.45.169.13:9900',
target: 'http://127.0.0.1:9900',
// target: 'http://119.45.169.13:9900',
changeOrigin: true,
},
'/api-device/': {
// target: 'http://127.0.0.1:9900',
target: 'http://119.45.169.13:9900',
target: 'http://127.0.0.1:9900',
// target: 'http://119.45.169.13:9900',
changeOrigin: true,
},
},
@@ -0,0 +1,4 @@
export const AUTH_CONFIG = {
// basicToken: 'Basic d2ViQXBwOndlYkFwcA==',
basicToken: 'Basic Z2ZhcHA6SWtpbmd0ZWNAMjAyMA==', // 备用token
};
@@ -1,6 +1,7 @@
// @ts-ignore
/* eslint-disable */
import { request } from 'umi';
import { AUTH_CONFIG } from '@/config/auth';
export async function currentUser(options?: { [key: string]: any }) {
return request<API.OptionalResult<API.CurrentUser>>('/api-user/users/current', {
@@ -38,7 +39,7 @@ export async function login(body: API.LoginParams, options?: { [key: string]: an
requestType: 'form',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
Authorization: 'Basic d2ViQXBwOndlYkFwcA==',
Authorization: AUTH_CONFIG.basicToken,
},
data: { ...body, grant_type: 'password_code' },
...(options || {}),