protected void postAuthenticate(Authenticator authenticator) { authenticator.postAuthenticate(); if (!authenticator.getStatus().equals(Authenticator.AuthenticationStatus.SUCCESS)) { return; } eventBridge.fireEvent(new PostAuthenticateEvent()); }
protected void postAuthenticate(Authenticator authenticator) { authenticator.postAuthenticate(); if (!authenticator.getStatus().equals(Authenticator.AuthenticationStatus.SUCCESS)) { return; } eventBridge.fireEvent(new PostAuthenticateEvent()); }
protected void postAuthenticate(Authenticator activeAuthenticator) { activeAuthenticator.postAuthenticate(); if (!activeAuthenticator.getStatus().equals(AuthenticationStatus.SUCCESS)) { return; } beanManager.fireEvent(new PostAuthenticateEvent()); }
protected void postAuthenticate(Authenticator authenticator) { authenticator.postAuthenticate(); if (!authenticator.getStatus().equals(Authenticator.AuthenticationStatus.SUCCESS)) { return; } eventBridge.fireEvent(new PostAuthenticateEvent()); }
protected Account authenticate() throws AuthenticationException { Account validatedAccount = null; if (authenticating) { authenticating = false; //X TODO discuss it throw new IllegalStateException("Authentication already in progress."); } try { authenticating = true; eventBridge.fireEvent(new PreAuthenticateEvent()); Authenticator authenticator = getAuthenticator(); if (AUTHENTICATION_LOGGER.isDebugEnabled()) { AUTHENTICATION_LOGGER.debugf("Authentication is going to be performed by authenticator [%s]", authenticator); } authenticator.authenticate(); if (authenticator.getStatus() == null) { throw new AuthenticationException("Authenticator must return a valid authentication status"); } if (authenticator.getStatus() == Authenticator.AuthenticationStatus.SUCCESS) { validatedAccount = authenticator.getAccount(); postAuthenticate(authenticator); } } catch (AuthenticationException e) { throw e; } catch (Throwable ex) { throw new AuthenticationException("Authentication failed.", ex); } finally { authenticating = false; } return validatedAccount; }
protected Account authenticate() throws AuthenticationException { Account validatedAccount = null; if (authenticating) { authenticating = false; //X TODO discuss it throw new IllegalStateException("Authentication already in progress."); } try { authenticating = true; eventBridge.fireEvent(new PreAuthenticateEvent()); Authenticator authenticator = getAuthenticator(); if (AUTHENTICATION_LOGGER.isDebugEnabled()) { AUTHENTICATION_LOGGER.debugf("Authentication is going to be performed by authenticator [%s]", authenticator); } authenticator.authenticate(); if (authenticator.getStatus() == null) { throw new AuthenticationException("Authenticator must return a valid authentication status"); } if (authenticator.getStatus() == Authenticator.AuthenticationStatus.SUCCESS) { validatedAccount = authenticator.getAccount(); postAuthenticate(authenticator); } } catch (AuthenticationException e) { throw e; } catch (Throwable ex) { throw new AuthenticationException("Authentication failed.", ex); } finally { authenticating = false; } return validatedAccount; }
protected Account authenticate() throws AuthenticationException { Account validatedAccount = null; if (authenticating) { authenticating = false; //X TODO discuss it throw new IllegalStateException("Authentication already in progress."); } try { authenticating = true; eventBridge.fireEvent(new PreAuthenticateEvent()); Authenticator authenticator = getAuthenticator(); if (AUTHENTICATION_LOGGER.isDebugEnabled()) { AUTHENTICATION_LOGGER.debugf("Authentication is going to be performed by authenticator [%s]", authenticator); } authenticator.authenticate(); if (authenticator.getStatus() == null) { throw new AuthenticationException("Authenticator must return a valid authentication status"); } if (authenticator.getStatus() == Authenticator.AuthenticationStatus.SUCCESS) { validatedAccount = authenticator.getAccount(); postAuthenticate(authenticator); } } catch (AuthenticationException e) { throw e; } catch (Throwable ex) { throw new AuthenticationException("Authentication failed.", ex); } finally { authenticating = false; } return validatedAccount; }