Commit a9bfae98 authored by wty's avatar wty

重写阿波罗配置获取3

parent a3da2156
......@@ -5,8 +5,7 @@
"SSO": {
"ssourl": "http://sso.duibadev.com.cn",
"systemId": 491,
"appSecret": "78b6cf42fe15f8b7bbaececea9bb2a6d",
"systemName": "duiba-aurora-node",
"systemName": "dui123",
"profiles": "dev"
},
"secret": "5d0cb61fe5ef40afa49bc22b64f9ede1"
......
......@@ -14,6 +14,7 @@ const getApollo = async () => {
console.info(apolloConfig)
const sourcesArray = apolloConfig.propertySources.map(v => v.source);
const sources = Object.assign({},...sourcesArray)
global['SSO_APP_SECRET'] = sources['spring.application.secret']
return sources
}
......
const express = require('express')
const router = express.Router()
const configDev = require('../../config/dev.json')
const config = require('../../config/getConfig')()
const SsoOauth2 = require('sso-oauth2').default
const ssoOauth2 = new SsoOauth2(configDev.SSO)
const ssoOauth2 = new SsoOauth2({
...config.SSO,
appSecret: global['SSO_APP_SECRET']
})
router.get('/ssoIndex', async (req, res) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment