mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
Merge branch 'main' of bitbucket.org:4Science/dspace-angular into feature/CST-5329
This commit is contained in:
@@ -219,6 +219,9 @@ describe('AuthEffects', () => {
|
|||||||
const expected = cold('--b-', { b: new RetrieveTokenAction() });
|
const expected = cold('--b-', { b: new RetrieveTokenAction() });
|
||||||
|
|
||||||
expect(authEffects.checkTokenCookie$).toBeObservable(expected);
|
expect(authEffects.checkTokenCookie$).toBeObservable(expected);
|
||||||
|
authEffects.checkTokenCookie$.subscribe(() => {
|
||||||
|
expect((authEffects as any).authorizationsService.invalidateAuthorizationsRequestCache).toHaveBeenCalled();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return a RETRIEVE_AUTH_METHODS action in response to a CHECK_AUTHENTICATION_TOKEN_COOKIE action when authenticated is false', () => {
|
it('should return a RETRIEVE_AUTH_METHODS action in response to a CHECK_AUTHENTICATION_TOKEN_COOKIE action when authenticated is false', () => {
|
||||||
|
@@ -162,6 +162,7 @@ export class AuthEffects {
|
|||||||
return this.authService.checkAuthenticationCookie().pipe(
|
return this.authService.checkAuthenticationCookie().pipe(
|
||||||
map((response: AuthStatus) => {
|
map((response: AuthStatus) => {
|
||||||
if (response.authenticated) {
|
if (response.authenticated) {
|
||||||
|
this.authorizationsService.invalidateAuthorizationsRequestCache();
|
||||||
return new RetrieveTokenAction();
|
return new RetrieveTokenAction();
|
||||||
} else {
|
} else {
|
||||||
return new RetrieveAuthMethodsAction(response);
|
return new RetrieveAuthMethodsAction(response);
|
||||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user