@cerema/cadriciel 1.4.15 → 1.4.16
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.
- package/cli/global/login.js +10 -6
- package/package.json +1 -1
package/cli/global/login.js
CHANGED
|
@@ -14,12 +14,16 @@ module.exports = (args) => {
|
|
|
14
14
|
const querystring = require('querystring');
|
|
15
15
|
|
|
16
16
|
const app = express();
|
|
17
|
-
const PORT = 4200;
|
|
18
|
-
|
|
19
|
-
const KEYCLOAK_SERVER = 'https://orion-recette.cerema.fr';
|
|
20
17
|
const REALM = 'CeremaApps';
|
|
21
|
-
|
|
22
|
-
const
|
|
18
|
+
|
|
19
|
+
const KEYCLOAK_SERVER = 'https://orion.cerema.fr';
|
|
20
|
+
const PORT = 14211;
|
|
21
|
+
const CLIENT_ID = 'cadriciel_login';
|
|
22
|
+
|
|
23
|
+
//const KEYCLOAK_SERVER = 'https://orion-recette.cerema.fr';
|
|
24
|
+
//const PORT = 4200;
|
|
25
|
+
//const CLIENT_ID = 'marep_dev';
|
|
26
|
+
const REDIRECT_URI = 'http://localhost:' + PORT + '/login';
|
|
23
27
|
|
|
24
28
|
const INDEX_HTML = fs.readFileSync(
|
|
25
29
|
__dirname + '/../assets/index.html',
|
|
@@ -61,7 +65,7 @@ module.exports = (args) => {
|
|
|
61
65
|
|
|
62
66
|
const auth = async (wellKnownConfig) => {
|
|
63
67
|
app.use(express.static(__dirname + '/../assets'));
|
|
64
|
-
app.get('/
|
|
68
|
+
app.get('/login', (req, res) => {
|
|
65
69
|
const code = req.query.code;
|
|
66
70
|
axios
|
|
67
71
|
.post(
|