Skip to content

Commit

Permalink
[ACS-6596] - verify ticket on app loading (#9244)
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikiwanekhyland authored Jan 18, 2024
1 parent d95e46e commit 7a40a61
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,12 @@ export class BasicAlfrescoAuthService extends BaseAuthenticationService {
this.appConfig.onLoad
.subscribe(() => {
if (!this.isOauth() && this.isLoggedIn()) {
this.onLogin.next('logged-in');
this.requireAlfTicket().then(() => {
this.onLogin.next('logged-in');
}).catch(() => {
this.contentAuth.invalidateSession();
this.onLogout.next('logout');
});
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ describe('AuthenticationService', () => {
});

it('should emit login event for kerberos', (done) => {
spyOn(basicAlfrescoAuthService, 'requireAlfTicket').and.returnValue(Promise.resolve());
const disposableLogin = authService.onLogin.subscribe(() => {
disposableLogin.unsubscribe();
done();
Expand Down

0 comments on commit 7a40a61

Please sign in to comment.