[jboss-user] [JBoss Seam] - Re: Seam security / identity.logout

b.reeve do-not-reply at jboss.com
Wed Nov 28 19:21:35 EST 2007


Thanks, it worked. I had another question too...
I am configuring my identity.login to loginBean.login and my loginBean class is like

  | import org.jboss.seam.annotations.In;
  | import org.jboss.seam.annotations.Name;
  | 
  | @Name("loginBean")
  | public class LoginBean {
  | 	
  | 	@In("#{identity.username}")
  | 	private String username;
  | 	
  | 	@In("#{identity.password}")
  | 	private String password;
  | 	
  | 	public boolean login() {
  | 		//login code here
  | 		return true;
  | 	}
  | 	
  | 	public void logout(){
  | 		//logout code here
  | 	}
  | 
  | }
  | 


  | <?xml version="1.0" encoding="UTF-8"?>
  | <components xmlns="http://jboss.com/products/seam/components"
  |             xmlns:core="http://jboss.com/products/seam/core"
  |             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  |             xsi:schemaLocation=
  |                 "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.0.xsd 
  |                  http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.0.xsd">
  | 
  | 	<security:identity authenticate-method="#{loginBean.login}"/>
  | 
  | 	<event type="org.jboss.seam.loggedOut">
  | 		<action execute="#{loginBean.logout}"/>
  | 	</event>
  | 
  | </components>
  | 

I am getting @In required exception during logout only for password field. identity.username is still there and its not complaining. Just wanted to double check if this is the normal behavior that identity.password will be flushed out once the user is authenticated while the username remains. Or am I missing something. 
Is it because the username is stored in the cookie. Please advice.

Thanks !

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108730#4108730

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108730



More information about the jboss-user mailing list