Browse Source

userpass param

all-modes
pbca26 8 years ago
parent
commit
dbbe44786b
  1. 2
      react/src/config.js
  2. 13
      react/src/util/auth.js

2
react/src/config.js

@ -1,10 +1,8 @@
module.exports = {
iguanaCorePort: 7778,
basiliskPort: 7779,
agamaPort: 17777,
enableCacheApi: true,
useBasiliskInstance: true,
useForksAll: true,
openAlias: false,
debug: true,
defaultLang: 'EN',

13
react/src/util/auth.js

@ -1,8 +1,15 @@
import { PassPhraseGenerator } from './crypto/passphrasegenerator.js';
import { md5 } from './crypto/md5.js';
let appSessionHash;
try {
appSessionHash = window.require('electron').remote.getCurrentWindow().appSessionHash;
} catch (e) {
appSessionHash = '1234';
}
export function iguanaSetRPCAuth() {
var tmpPass = '1234'; //md5(PassPhraseGenerator.generatePassPhrase(128));
sessionStorage.setItem('IguanaRPCAuth', tmpPass);
console.log('passphraseGen', tmpPass);
sessionStorage.setItem('IguanaRPCAuth', appSessionHash);
console.log('passphraseGen', appSessionHash);
}
Loading…
Cancel
Save