Tidying up class.
This commit is contained in:
parent
c0f5230667
commit
ae40919d13
|
@ -102,8 +102,7 @@ import org.springframework.web.bind.RequestUtils;
|
|||
* benalex $
|
||||
*/
|
||||
public class TokenBasedRememberMeServices implements RememberMeServices, InitializingBean, LogoutHandler {
|
||||
// ~ Static fields/initializers
|
||||
// =====================================================================================
|
||||
//~ Static fields/initializers =====================================================================================
|
||||
|
||||
public static final String ACEGI_SECURITY_HASHED_REMEMBER_ME_COOKIE_KEY = "ACEGI_SECURITY_HASHED_REMEMBER_ME_COOKIE";
|
||||
|
||||
|
@ -111,8 +110,7 @@ public class TokenBasedRememberMeServices implements RememberMeServices, Initial
|
|||
|
||||
protected static final Log logger = LogFactory.getLog(TokenBasedRememberMeServices.class);
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
//~ Instance fields ================================================================================================
|
||||
|
||||
protected AuthenticationDetailsSource authenticationDetailsSource = new AuthenticationDetailsSourceImpl();
|
||||
|
||||
|
@ -126,12 +124,9 @@ public class TokenBasedRememberMeServices implements RememberMeServices, Initial
|
|||
|
||||
private boolean alwaysRemember = false;
|
||||
|
||||
private static final int DEFAULT_ORDER = Integer.MAX_VALUE; // ~ default
|
||||
|
||||
private String cookieName = ACEGI_SECURITY_HASHED_REMEMBER_ME_COOKIE_KEY;
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
Assert.hasLength(key);
|
||||
|
@ -155,7 +150,7 @@ public class TokenBasedRememberMeServices implements RememberMeServices, Initial
|
|||
if (map.size() > 1) {
|
||||
throw new IllegalArgumentException(
|
||||
"More than one UserDetailsService beans detected please refer to the one using "
|
||||
+ " [ principalRepositoryBeanRef ] " + "attribute");
|
||||
+ " [ principalRepositoryBeanRef ] attribute");
|
||||
}
|
||||
else if (map.size() == 1) {
|
||||
setUserDetailsService((UserDetailsService) map.values().iterator().next());
|
||||
|
@ -397,9 +392,8 @@ public class TokenBasedRememberMeServices implements RememberMeServices, Initial
|
|||
response.addCookie(makeValidCookie(tokenValueBase64, request, tokenValiditySeconds));
|
||||
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger
|
||||
.debug("Added remember-me cookie for user '" + username + "', expiry: '" + new Date(expiryTime)
|
||||
+ "'");
|
||||
logger.debug("Added remember-me cookie for user '"
|
||||
+ username + "', expiry: '" + new Date(expiryTime) + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue