Refactoring of auth.interceptor

This commit is contained in:
Julius Gruber
2019-06-05 13:39:18 +02:00
parent 994d96bc95
commit 20794381f1
4 changed files with 24 additions and 18 deletions

View File

@@ -154,10 +154,10 @@ export class AuthInterceptor implements HttpInterceptor {
console.log('error.headers.get("location"): ', location);
console.log('www-authenticate', error.headers.get('www-authenticate'));
let strings = error.headers.get('www-authenticate').split(',');
let string = strings[1];
let s = string.replace('location=', '');
let s1 = s.replace('"', '').trim();
const strings = error.headers.get('www-authenticate').split(',');
const locationstring = strings[1];
const s = locationstring.replace('location=', '');
const s1 = s.replace('"', '').trim();
console.log('This should be the location: ', s1);
location = s1;