You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by juan rojas <ju...@rhemsolutions.com> on 2012/08/25 02:47:06 UTC

Re: Configuring logout.redirectUrl via Guice

I have the same problem with shiro-guice 1.2.1 so I did a workaround using a
custom filter extending LogoutFilter
/*does not work*/
//bindConstant().annotatedWith(Names.named("shiro.redirectUrl")).to("/login.jsp");
//addFilterChain("/logout", LOGOUT);

/*work fine*/
bindConstant().annotatedWith(Names.named("myRedirectUrl")).to("/login.jsp");
Key<MyLogoutFilter> MYLOGOUT = Key.get(MyLogoutFilter.class);		
addFilterChain("/logout", MYLOGOUT);


*My Custom Filter*

public class MyLogoutFilter extends LogoutFilter {

	@Inject
	@Override
	public void setRedirectUrl(@Named("myRedirectUrl") String redirectUrl) {
		super.setRedirectUrl(redirectUrl);
	}
}

Greetings...



--
View this message in context: http://shiro-user.582556.n2.nabble.com/Configuring-logout-redirectUrl-via-Guice-tp7577451p7577739.html
Sent from the Shiro User mailing list archive at Nabble.com.