Test CORS policy'

This commit is contained in:
Julius Gruber
2019-06-18 14:30:02 +02:00
parent 8ed359cc7e
commit 4504fa1818
7 changed files with 109 additions and 3 deletions

View File

@@ -114,6 +114,17 @@ export class AuthService {
}
public startShibbAuth(): Observable<AuthStatus> {
return this.authRequestService.postToShibbEndpoint().pipe(
map((status: AuthStatus) => {
if (status.authenticated) {
return status;
} else {
throw(new Error('Invalid email or password'));
}
}))
}
/**
* Determines if the user is authenticated
* @returns {Observable<boolean>}
@@ -440,4 +451,5 @@ export class AuthService {
this.store.dispatch(new SetRedirectUrlAction(''));
this.storage.remove(REDIRECT_COOKIE);
}
}