mirror of
https://github.com/Ride-The-Lightning/RTL.git
synced 2026-08-13 12:33:07 +02:00
Sending access key from front end
Sending access key from front end
This commit is contained in:
parent
24ac0de8d8
commit
81a6a36fba
4 changed files with 13 additions and 8 deletions
|
|
@ -8,5 +8,5 @@
|
|||
<link rel="stylesheet" href="styles.7e944f30e4357f41ed14.css"></head>
|
||||
<body>
|
||||
<rtl-app></rtl-app>
|
||||
<script type="text/javascript" src="runtime.ec2944dd8b20ec099bf3.js"></script><script type="text/javascript" src="polyfills.418928a701f2040ada02.js"></script><script type="text/javascript" src="main.e11044a8702e0e3c2456.js"></script></body>
|
||||
<script type="text/javascript" src="runtime.ec2944dd8b20ec099bf3.js"></script><script type="text/javascript" src="polyfills.418928a701f2040ada02.js"></script><script type="text/javascript" src="main.efff2a0803223cb3565a.js"></script></body>
|
||||
</html>
|
||||
|
|
|
|||
1
angular/main.efff2a0803223cb3565a.js
Normal file
1
angular/main.efff2a0803223cb3565a.js
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -26,10 +26,9 @@ exports.authenticateUserWithCookie = (req, res, next) => {
|
|||
};
|
||||
|
||||
exports.authenticateUser = (req, res, next) => {
|
||||
password = atob(req.body.password);
|
||||
if(+common.rtl_sso) {
|
||||
const access_key = req.cookies['access-key'];
|
||||
res.clearCookie("access-key");
|
||||
if (common.cookie === access_key) {
|
||||
if (common.cookie === password) {
|
||||
const token = jwt.sign(
|
||||
{ user: 'Custom_User', lndConfigPath: common.lnd_config_path, macaroonPath: common.macaroon_path },
|
||||
'default_secret_key'
|
||||
|
|
@ -42,7 +41,6 @@ exports.authenticateUser = (req, res, next) => {
|
|||
});
|
||||
}
|
||||
} else {
|
||||
password = atob(req.body.password);
|
||||
if(upperCase(common.node_auth_type) === 'CUSTOM') {
|
||||
if (common.rtl_pass === password) {
|
||||
var rpcUser = 'Custom_User';
|
||||
|
|
@ -91,4 +89,4 @@ exports.authenticateUser = (req, res, next) => {
|
|||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
10
package-lock.json
generated
10
package-lock.json
generated
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "rtl",
|
||||
"version": "0.2.8-beta",
|
||||
"version": "0.2.9-beta",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
|
@ -5186,6 +5186,7 @@
|
|||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.0.tgz",
|
||||
"integrity": "sha512-l2jRuU1NAWK6AW5qqcTATWQJvNPEwkM7NEKSiv/gqOsoSQbVoWyqVEY5GS+XPQ88zLNmqASRpzfdm8d79hJS+w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"async": "^2.5.0",
|
||||
"optimist": "^0.6.1",
|
||||
|
|
@ -5197,6 +5198,7 @@
|
|||
"version": "2.6.2",
|
||||
"resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz",
|
||||
"integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"lodash": "^4.17.11"
|
||||
}
|
||||
|
|
@ -5204,7 +5206,8 @@
|
|||
"source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
|
||||
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -10653,6 +10656,7 @@
|
|||
"version": "3.4.9",
|
||||
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.9.tgz",
|
||||
"integrity": "sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"commander": "~2.17.1",
|
||||
|
|
@ -10663,12 +10667,14 @@
|
|||
"version": "2.17.1",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz",
|
||||
"integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue