diff --git a/src/app/core/auth/auth.reducer.ts b/src/app/core/auth/auth.reducer.ts index b7cda09199..be1aa134fc 100644 --- a/src/app/core/auth/auth.reducer.ts +++ b/src/app/core/auth/auth.reducer.ts @@ -46,9 +46,6 @@ export interface AuthState { // true when refreshing token refreshing?: boolean; - // sso login url - ssoLoginUrl?: string; - // the authenticated user user?: EPerson; diff --git a/src/app/core/auth/auth.service.ts b/src/app/core/auth/auth.service.ts index dfde0b18b6..e0aecd91a0 100644 --- a/src/app/core/auth/auth.service.ts +++ b/src/app/core/auth/auth.service.ts @@ -230,30 +230,14 @@ export class AuthService { map((status: AuthStatus) => { let authMethods: AuthMethodModel[]; if (isNotEmpty(status.authMethods)) { - // url = this.parseSSOLocation(status.ssoLoginUrl); - // console.log('Parsed SSOLoginUrl: ', url); - // url = 'https://fis.tiss.tuwien.ac.at/Shibboleth.sso/Login?target=https://fis.tiss.tuwien.ac.at'; - authMethods = status.authMethods; + authMethods = status.authMethods; } return authMethods; }) ) } - /* private parseSSOLocation(url: string): string { - console.log('auth.service parseSSOLocation was called'); - const parseUrl = decodeURIComponent(url); - // const urlTree: UrlTree = this.router.parseUrl(url); - // this.router.parseUrl(url); - // if (url.endsWith('/')) { - // url += 'login'; - // } else { - // url = url.replace('/?target=http(.+)/g', 'https://hasselt-dspace.dev01.4science.it/dspace-spring-rest/shib.html'); - // } - // console.log(url); - const target = `?target=${this.config.auth.target.host}${this.config.auth.target.page}`; - return parseUrl.replace(/\?target=http.+/g, target); - }*/ + /** * Create a new user diff --git a/src/app/core/auth/selectors.ts b/src/app/core/auth/selectors.ts index 8888907356..0b3504088e 100644 --- a/src/app/core/auth/selectors.ts +++ b/src/app/core/auth/selectors.ts @@ -107,13 +107,6 @@ const _getRegistrationError = (state: AuthState) => state.error; */ const _getRedirectUrl = (state: AuthState) => state.redirectUrl; -/** - * Returns the sso login url. - * @function _getSSOLoginUrl - * @param {State} state - * @returns {string} - */ -const _getSSOLoginUrl = (state: AuthState) => state.ssoLoginUrl; /** * Returns the authenticated user @@ -212,12 +205,3 @@ export const getRegistrationError = createSelector(getAuthState, _getRegistratio * @return {string} */ export const getRedirectUrl = createSelector(getAuthState, _getRedirectUrl); - -/** - * Returns the sso login url. - * @function getSSOLoginUrl - * @param {AuthState} state - * @param {any} props - * @return {string} - */ -export const getSSOLoginUrl = createSelector(getAuthState, _getSSOLoginUrl); diff --git a/src/app/shared/log-in/log-in.component.html b/src/app/shared/log-in/log-in.component.html index a4c1cb9e87..f6b81b89b6 100644 --- a/src/app/shared/log-in/log-in.component.html +++ b/src/app/shared/log-in/log-in.component.html @@ -27,11 +27,13 @@ [disabled]="!form.valid">{{"login.form.submit" | translate}}
+ + + <!–
{{"login.form.or-divider" | translate}}
–> {{"login.form.ssoLogin" | translate}} - + -->