[jboss-cvs] jboss-seam/src/main/org/jboss/seam/security ...
Shane Bryzak
Shane_Bryzak at symantec.com
Tue Jan 30 19:06:09 EST 2007
User: sbryzak2
Date: 07/01/30 19:06:09
Modified: src/main/org/jboss/seam/security Identity.java
Log:
minor improvements
Revision Changes Path
1.29 +23 -15 jboss-seam/src/main/org/jboss/seam/security/Identity.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Identity.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/security/Identity.java,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- Identity.java 30 Jan 2007 23:45:30 -0000 1.28
+++ Identity.java 31 Jan 2007 00:06:08 -0000 1.29
@@ -168,13 +168,29 @@
}
}
- public void login()
+ public String login()
throws LoginException
{
- login(null);
+ return login(null);
}
- public void login(LoginContext loginContext)
+ public String login(LoginContext loginContext)
+ throws LoginException
+ {
+ try
+ {
+ authenticate(loginContext);
+ return "success";
+ }
+ catch (LoginException ex)
+ {
+ log.error("Login error", ex);
+ FacesMessages.instance().add("Login failed.");
+ return null;
+ }
+ }
+
+ public void authenticate(LoginContext loginContext)
throws LoginException
{
CallbackHandler handler = createCallbackHandler(username, password);
@@ -185,18 +201,10 @@
getConfiguration());
}
- try
- {
loginContext.login();
password = null;
postLogin();
}
- catch (LoginException ex)
- {
- log.error("Login failed", ex);
- FacesMessages.instance().add("Login failed.");
- }
- }
public void logout()
{
More information about the jboss-cvs-commits
mailing list