Skip to content
Snippets Groups Projects
Commit 0502d3f8 authored by Chris Hines's avatar Chris Hines
Browse files

remove unused services

parent 4e467099
No related branches found
No related tags found
3 merge requests!106if stat fails, display the error instead of immediately refreshing...,!99Dev,!44Dev
......@@ -2,7 +2,6 @@ import { Injectable } from '@angular/core';
import { HttpClientModule, HttpClient, HttpHeaders, HttpErrorResponse } from '@angular/common/http';
import { Observable, Subject, BehaviorSubject } from 'rxjs';
import { catchError, map, tap, take,filter,skip, switchMap } from 'rxjs/operators';
import { ActivatedRoute, Router } from '@angular/router';
import {LocationStrategy, Location} from '@angular/common';
// import { keypair } from 'keypair';
import * as keypair from 'keypair';
......@@ -26,7 +25,6 @@ export class AuthorisationService {
public readonly agentContents: BehaviorSubject<any>;
public loggedInAuthZ: BehaviorSubject<SshAuthzServer[]>;
public loggedOutAuthZ: BehaviorSubject<SshAuthzServer[]>;
public readyToNavigate: Subject<[Boolean,string]>;
//public progress: Subject<string>;
// private keyCert: Subject<KeyCert>;
public backendURI: string;
......@@ -35,8 +33,6 @@ export class AuthorisationService {
constructor(private http: HttpClient,
private locationStrategy: LocationStrategy,
private route: ActivatedRoute,
private router: Router,
private backendSelectionService: BackendSelectionService,
private location: Location,
private notifications: NotificationsService) {
......@@ -77,6 +73,7 @@ export class AuthorisationService {
}
this.getSshAuthzServers();
}
removeLocalAuthZ() {
localStorage.removeItem('localauthservers');
this.getSshAuthzServers();
......@@ -140,15 +137,6 @@ export class AuthorisationService {
this.sshAuthzServers.next(auths);
}
public getCert(token: AuthToken, apiserver: any, pubkey: any) {
let headers = new HttpHeaders();
let options = { headers: headers, withCredentials: true};
let data = {'token': token.token, 'pubkey': pubkey, 'signing_url': token.sshauthzservice.sign};
return this.http.post<any>(apiserver.tes+'/getcert',data, options)
}
public getKeys(id?: Identity) {
try{
return JSON.parse(sessionStorage.getItem('keys'));
......@@ -273,14 +261,6 @@ public getKeys(id?: Identity) {
this.notifications.notify('There was an error logging in or generating crypto tokens');
console.error(error);
}
/* private signingError(error: any,sshauthzservice: SshAuthzServer) {
this.notifications.notify('You don\'t appear to have an account on '+sshauthzservice.name);
if (!(sshauthzservice.logout === null)) {
window.open(sshauthzservice.logout);
}
this.readyToNavigate.next([true,'/noaccount/'+sshauthzservice.name])
}*/
private handleError<T> (result?: T) {
return (error: any): Observable<T> => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment