v0.5.145: /v2/iam_response через mainAuth.fetchIamUser
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ipwhitelist",
|
"name": "ipwhitelist",
|
||||||
"version": "0.5.144",
|
"version": "0.5.145",
|
||||||
"description": "IP WhiteList microservice for cloud provider",
|
"description": "IP WhiteList microservice for cloud provider",
|
||||||
"main": "server.js",
|
"main": "server.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
+2
-1
@@ -55,7 +55,8 @@ function createV2Router() {
|
|||||||
const token = req.session && req.session.token;
|
const token = req.session && req.session.token;
|
||||||
if (!token) return res.send('<h2>Нет токена</h2><p><a href="/v2/login">Войти</a></p>');
|
if (!token) return res.send('<h2>Нет токена</h2><p><a href="/v2/login">Войти</a></p>');
|
||||||
try {
|
try {
|
||||||
const iamData = await auth.fetchIamUser(token);
|
const mainAuth = require('../src/auth');
|
||||||
|
const iamData = await mainAuth.fetchIamUser(token);
|
||||||
res.set('Content-Type', 'text/html; charset=utf-8');
|
res.set('Content-Type', 'text/html; charset=utf-8');
|
||||||
res.send('<!DOCTYPE html>\n<html><head><meta charset="utf-8"><title>IAM Raw</title>'
|
res.send('<!DOCTYPE html>\n<html><head><meta charset="utf-8"><title>IAM Raw</title>'
|
||||||
+ '<style>body{font-family:monospace;background:#111;color:#eee;padding:20px}'
|
+ '<style>body{font-family:monospace;background:#111;color:#eee;padding:20px}'
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
// ═══════════════════════════════════════════════════════════════════════════════
|
// ═══════════════════════════════════════════════════════════════════════════════
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
version: '0.5.144',
|
version: '0.5.145',
|
||||||
|
|
||||||
// ── IAM ──────────────────────────────────────────────────────────────────
|
// ── IAM ──────────────────────────────────────────────────────────────────
|
||||||
iamUrl: process.env.V2_IAM_URL || 'https://auth-api.ngcloud.ru/api/v1/auth/user',
|
iamUrl: process.env.V2_IAM_URL || 'https://auth-api.ngcloud.ru/api/v1/auth/user',
|
||||||
|
|||||||
Reference in New Issue
Block a user