01: /* ZkTokenBasedRememberMeServices.java
02:
03: {{IS_NOTE
04: Purpose:
05:
06: Description:
07:
08: History:
09: Thu Dec 28 09:26:17 2006, Created by Henri
10: }}IS_NOTE
11:
12: Copyright (C) 2006 Potix Corporation. All Rights Reserved.
13:
14: {{IS_RIGHT
15: }}IS_RIGHT
16: */
17: package org.zkoss.zkplus.acegi;
18:
19: import org.acegisecurity.ui.rememberme.TokenBasedRememberMeServices;
20:
21: import javax.servlet.http.HttpServletRequest;
22:
23: /**
24: * <p>get rememberme from request's attribute rather than request's parameter.</p>
25: *
26: * @author Henri
27: */
28: public class ZkTokenBasedRememberMeServices extends
29: TokenBasedRememberMeServices {
30: protected boolean rememberMeRequested(HttpServletRequest request,
31: String param) {
32: if (isAlwaysRemember()) {
33: return true;
34: }
35:
36: if (param == null) {
37: return false;
38: }
39:
40: Boolean yesno = (Boolean) request.getAttribute(param);
41: return yesno != null && yesno.booleanValue();
42: }
43: }
|