disable apache shiro remember me function

This commit is contained in:
Sebastian Sdorra
2015-03-21 17:03:23 +01:00
parent 63fb1f23e9
commit fd683dd6b4
5 changed files with 136 additions and 32 deletions

View File

@@ -74,28 +74,7 @@ public final class Tokens
public static AuthenticationToken createAuthenticationToken(
HttpServletRequest request, String username, String password)
{
return createAuthenticationToken(request, username, password, false);
}
/**
* Build an {@link AuthenticationToken} for use with
* {@link Subject#login(org.apache.shiro.authc.AuthenticationToken)}.
*
*
* @param request servlet request
* @param username username of the user to authenticate
* @param password password of the user to authenticate
* @param rememberMe true to remember the user across sessions
*
* @return authentication token
*
* @since 1.31
*/
public static AuthenticationToken createAuthenticationToken(
HttpServletRequest request, String username, String password,
boolean rememberMe)
{
return new UsernamePasswordToken(username, password, rememberMe,
return new UsernamePasswordToken(username, password,
request.getRemoteAddr());
}
}