Basic implmentation of the dynamic rendering of Authentication Methods

This commit is contained in:
Julius Gruber
2019-09-04 16:19:59 +02:00
parent c428b1deef
commit 6167012e32
5 changed files with 18 additions and 17 deletions

View File

@@ -115,6 +115,19 @@ export class AuthService {
}
shibbolethAuthenticate(location: string) {
// implement a call to the backend here
console.log('location: ', location);
return this.authRequestService.postToEndpoint('login').pipe(
map((status: AuthStatus) => {
if (status.authenticated) {
return status;
} else {
throw(new Error('Shibboleth login failed'));
}
}))
}
public startShibbAuth(): Observable<AuthStatus> {
console.log('startShibAuth() was called');
// Attempt authenticating the user after the shibboleth/saml response reached the backend