mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-16 22:43:03 +00:00
authService startShibAuth() changed
This commit is contained in:
@@ -122,15 +122,15 @@ export class AuthService {
|
|||||||
const password = 'rest'
|
const password = 'rest'
|
||||||
const body = (`password=${Base64EncodeUrl(password)}&user=${Base64EncodeUrl(user)}`);
|
const body = (`password=${Base64EncodeUrl(password)}&user=${Base64EncodeUrl(user)}`);
|
||||||
const options: HttpOptions = Object.create({});*/
|
const options: HttpOptions = Object.create({});*/
|
||||||
let headers = new HttpHeaders();
|
// let headers = new HttpHeaders();
|
||||||
headers = headers.append('Content-Type', 'application/x-www-form-urlencoded');
|
// headers = headers.append('Content-Type', 'application/x-www-form-urlencoded');
|
||||||
// options.headers = headers;
|
// options.headers = headers;
|
||||||
return this.authRequestService.postToEndpoint('login').pipe(
|
return this.authRequestService.postToEndpoint('login').pipe(
|
||||||
map((status: AuthStatus) => {
|
map((status: AuthStatus) => {
|
||||||
if (status.authenticated) {
|
if (status.authenticated) {
|
||||||
return status;
|
return status;
|
||||||
} else {
|
} else {
|
||||||
throw(new Error('Invalid email or password'));
|
throw(new Error('Shibboleth login failed'));
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user