* implementations simply authenticates the user locally.
*/
@Override
public void afterOpenIdAuth(OpenIdAuthenticationResult result) {
if (result.isAuthenticated()) {
HAccount authenticatedAccount =
accountDAO.getByCredentialsId(result.getAuthenticatedId());
identity.setPreAuthenticated(true);
if (authenticatedAccount != null
&& authenticatedAccount.isEnabled()) {
credentials.setUsername(authenticatedAccount.getUsername());
Identity.instance().acceptExternallyAuthenticatedPrincipal(
(new OpenIdPrincipal(result.getAuthenticatedId())));
this.loginImmediate();
}
// If the user hasn't been registered yet