Commit 65658df9 authored by Chris Hines's avatar Chris Hines
Browse files

weird hanging on dev server, trying to debug

parent e13fd70f
Pipeline #7536 passed with stages
in 3 minutes and 1 second
......@@ -168,21 +168,26 @@ export class AuthorisationService {
public getCert() {
var token: AuthToken;
token = this.token.value;
console.log('entered getCert');
if (token === null || token === undefined || token.token === undefined || token.token === '' || token.token === null) {
this.token.pipe(skip(1),take(1)).subscribe(() => this.getCert())
console.log('getCert token not defined, setting callback');
this.token.pipe(skip(1),take(1)).subscribe(() => this.getCert());
return
}
if (this.backendSelectionService.apiserver.value === null || this.backendSelectionService.apiserver.value === undefined) {
this.backendSelectionService.apiserver.pipe(skip(1),take(1)).subscribe(() => this.getCert())
console.log('getCert api server not defined, setting callback');
this.backendSelectionService.apiserver.pipe(skip(1),take(1)).subscribe(() => this.getCert());
return
}
console.log('generating ssh key');
let starttime = new Date();
let newkeypair = keypair();
let publicKey = forge.pki.publicKeyFromPem(newkeypair.public);
let sshpub = forge.ssh.publicKeyToOpenSSH(publicKey, 'sv2@monash.edu');
let endtime = new Date();
console.log('created a private key, getting it signed');
let headers = new HttpHeaders();
let options = { headers: headers, withCredentials: true};
......
......@@ -50,7 +50,7 @@ export class BackendSelectionService {
this.saveLastApiServer(this.apiserver.value)
}
storeLocalAPIServers(apiservers) {
/* storeLocalAPIServers(apiservers) {
localStorage.setItem('localAPIServers',JSON.stringify(apiservers));
this.getAPIServers();
}
......@@ -58,7 +58,7 @@ export class BackendSelectionService {
removeLocalAPIServer() {
localStorage.removeItem('localAPIServers');
this.getAPIServers();
}
}*/
getAPIServers() {
console.log('retrieving api servers');
......
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