mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-16 06:23:03 +00:00
Hardcoded ssoLoginUrl in auth.service retrieveAuthMethods
This commit is contained in:
@@ -33,7 +33,7 @@ module.exports = {
|
|||||||
auth: {
|
auth: {
|
||||||
target: {
|
target: {
|
||||||
host: 'https://fis.tiss.tuwien.ac.at',
|
host: 'https://fis.tiss.tuwien.ac.at',
|
||||||
page: '/spring-rest/login.html'
|
page: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// Form settings
|
// Form settings
|
||||||
|
@@ -77,7 +77,7 @@ export class AuthInterceptor implements HttpInterceptor {
|
|||||||
return authStatus;
|
return authStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
private getLocationfromHeader(header: HttpHeaders): string {
|
private getSSOLocationfromHeader(header: HttpHeaders): string {
|
||||||
console.log('HEADER www-authenticate: ', header.get('www-authenticate'));
|
console.log('HEADER www-authenticate: ', header.get('www-authenticate'));
|
||||||
let location = '';
|
let location = '';
|
||||||
if (header.get('www-authenticate').startsWith('shibboleth realm')) {
|
if (header.get('www-authenticate').startsWith('shibboleth realm')) {
|
||||||
@@ -164,7 +164,7 @@ export class AuthInterceptor implements HttpInterceptor {
|
|||||||
// console.log('error: ', error);
|
// console.log('error: ', error);
|
||||||
let location = '';
|
let location = '';
|
||||||
if (error.headers.get('www-authenticate') != null) {
|
if (error.headers.get('www-authenticate') != null) {
|
||||||
location = this.getLocationfromHeader(error.headers);
|
location = this.getSSOLocationfromHeader(error.headers);
|
||||||
}
|
}
|
||||||
// Create a new HttpResponse and return it, so it can be handle properly by AuthService.
|
// Create a new HttpResponse and return it, so it can be handle properly by AuthService.
|
||||||
const authResponse = new HttpResponse({
|
const authResponse = new HttpResponse({
|
||||||
|
@@ -209,7 +209,9 @@ export class AuthService {
|
|||||||
let url = '';
|
let url = '';
|
||||||
if (isNotEmpty(status.ssoLoginUrl)) {
|
if (isNotEmpty(status.ssoLoginUrl)) {
|
||||||
// url = this.parseSSOLocation(status.ssoLoginUrl);
|
// url = this.parseSSOLocation(status.ssoLoginUrl);
|
||||||
url = 'https://fis.tiss.tuwien.ac.at/Shibboleth.sso/Login?target=https://fis.tiss.tuwien.ac.at';
|
// console.log('Parsed SSOLoginUrl: ', url);
|
||||||
|
url = 'https://fis.tiss.tuwien.ac.at/Shibboleth.sso/Login?target=https://fis.tiss.tuwien.ac.at';
|
||||||
|
// url = status.ssoLoginUrl;
|
||||||
}
|
}
|
||||||
return url;
|
return url;
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user