Author: prabath
Date: Mon Feb 18 21:14:48 2008
New Revision: 13878
Log:
exception handling
Modified:
trunk/solutions/identity/modules/user-ui/src/main/java/org/wso2/solutions/identity/user/ui/action/OpenIDAuthVerificationAction.java
Modified:
trunk/solutions/identity/modules/user-ui/src/main/java/org/wso2/solutions/identity/user/ui/action/OpenIDAuthVerificationAction.java
==============================================================================
---
trunk/solutions/identity/modules/user-ui/src/main/java/org/wso2/solutions/identity/user/ui/action/OpenIDAuthVerificationAction.java
(original)
+++
trunk/solutions/identity/modules/user-ui/src/main/java/org/wso2/solutions/identity/user/ui/action/OpenIDAuthVerificationAction.java
Mon Feb 18 21:14:48 2008
@@ -12,6 +12,7 @@
import org.openid4java.message.ParameterList;
import org.apache.struts2.StrutsStatics;
+import org.wso2.solutions.identity.IdentityConstants;
import org.wso2.solutions.identity.IdentityProviderConstants;
import org.wso2.solutions.identity.IdentityProviderException;
import org.wso2.solutions.identity.UserStore;
@@ -68,7 +69,7 @@
if (infoCardSignin != null && "Log in".equals(infoCardSignin)) {
// User logs in with an information card
if (UserUtil.verifyInfoCardLogin(context, openID)) {
-
+
populateUserProfiles(user);
// Okay - user used InfoCards to login - next when tries login
@@ -86,8 +87,8 @@
// always.
response
.sendRedirect("server?_action=complete&authenticatedAndApproved=true");
- }
-
+ }
+
return SUCCESS;
} else {
@@ -123,7 +124,7 @@
}
if (UserUtil.doLogin(user, password)) {
-
+
populateUserProfiles(user);
String remeberMe = null;
@@ -159,8 +160,8 @@
// always.
response
.sendRedirect("server?_action=complete&authenticatedAndApproved=true");
- }
-
+ }
+
return SUCCESS;
} else {
this.addErrorMessage(getText("invalid_user_password"));
@@ -199,11 +200,11 @@
}
} catch (IdentityProviderException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ throw new RelyingPartyException(
+ IdentityConstants.ErrorCodes.PROFILE_RETRIEVAL_FAILURE, e);
} catch (UserManagerException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ throw new RelyingPartyException(
+ IdentityConstants.ErrorCodes.PROFILE_RETRIEVAL_FAILURE, e);
}
}
_______________________________________________
Identity-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/identity-dev