{
log.error("Error logging in", ex);
throw new LoginException(ex.getMessage());
}
MethodExpression mb = Identity.instance().getAuthenticateMethod();
if (mb==null)
{
throw new IllegalStateException("No authentication method defined - please define <security:authenticate-method/> for <security:identity/> in components.xml");
}
try
{
return (Boolean) mb.invoke();
}
catch (Exception ex)
{
log.error("Error invoking login method", ex);
throw new LoginException(ex.getMessage());