Author: amarkhel
Date: 2009-03-06 15:27:05 -0500 (Fri, 06 Mar 2009)
New Revision: 12883
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Authenticator.java
trunk/test-applications/realworld2/web/src/main/webapp/WEB-INF/pages.xml
Log:
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Authenticator.java
===================================================================
---
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Authenticator.java 2009-03-06
19:44:50 UTC (rev 12882)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Authenticator.java 2009-03-06
20:27:05 UTC (rev 12883)
@@ -175,11 +175,7 @@
}
public String start(){
- if(!identity.isLoggedIn() || startConversation != null){
- if(startConversation != null){
- identity.logout();
- identity.unAuthenticate();
- }
+ if(!identity.isLoggedIn()){
credentials.clear();
try {
identity.authenticate();
@@ -191,6 +187,13 @@
return "";
}
+ public String startConversation(){
+ identity.logout();
+ identity.unAuthenticate();
+ credentials.clear();
+ return "";
+ }
+
private boolean wantLoginAnonymous() {
return null == credentials.getUsername() ||
credentials.getUsername().equals("");
}
Modified: trunk/test-applications/realworld2/web/src/main/webapp/WEB-INF/pages.xml
===================================================================
--- trunk/test-applications/realworld2/web/src/main/webapp/WEB-INF/pages.xml 2009-03-06
19:44:50 UTC (rev 12882)
+++ trunk/test-applications/realworld2/web/src/main/webapp/WEB-INF/pages.xml 2009-03-06
20:27:05 UTC (rev 12883)
@@ -18,8 +18,9 @@
</page>
<page view-id="/index.xhtml">
- <begin-conversation join="true" if="#{!identity.isLoggedIn() or
authenticator.startConversation!=null}"/>
- <action if="#{!identity.isLoggedIn() or
authenticator.startConversation!=null}"
execute="#{authenticator.start}"/>
+ <begin-conversation if="#{!identity.isLoggedIn()}"/>
+ <action if="#{authenticator.startConversation!=null}"
execute="#{authenticator.startConversation}"/>
+ <action if="#{!identity.isLoggedIn()}"
execute="#{authenticator.start}"/>
<navigation from-action="#{authenticator.logout}">
<rule if-outcome="logout">
<end-conversation />