mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 02:24:11 +00:00
Changed auth-interceptor: location used to makeAuthStatusObject()
This commit is contained in:
@@ -26,7 +26,7 @@ import {
|
||||
RefreshTokenSuccessAction,
|
||||
RegistrationAction,
|
||||
RegistrationErrorAction,
|
||||
RegistrationSuccessAction
|
||||
RegistrationSuccessAction, RetrieveAuthMethodsErrorAction, RetrieveAuthMethodsSuccessAction
|
||||
} from './auth.actions';
|
||||
import { EPerson } from '../eperson/models/eperson.model';
|
||||
import { AuthStatus } from './models/auth-status.model';
|
||||
@@ -169,6 +169,19 @@ export class AuthEffects {
|
||||
tap(() => this.authService.redirectToLoginWhenTokenExpired())
|
||||
);
|
||||
|
||||
@Effect()
|
||||
public retrieveMethods$: Observable<Action> = this.actions$
|
||||
.pipe(
|
||||
ofType(AuthActionTypes.RETRIEVE_AUTH_METHODS),
|
||||
switchMap(() => {
|
||||
return this.authService.retrieveAuthMethods()
|
||||
.pipe(
|
||||
map((location: any) => new RetrieveAuthMethodsSuccessAction(location)),
|
||||
catchError((error) => observableOf(new RetrieveAuthMethodsErrorAction()))
|
||||
)
|
||||
})
|
||||
)
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @param {Actions} actions$
|
||||
|
Reference in New Issue
Block a user