public class IPAddressLoginHandler extends AbstractLoginHandler
| Modifier and Type | Field and Description |
|---|---|
private String |
authenticatedUser
The username to use for IP-address "authenticated" users.
|
private boolean |
ipInRangeIsAuthenticated
Whether a user is "authenticated" if their IP address is within a configured IP range.
|
private List<IPRange> |
ipRanges
List of configured IP ranged.
|
private org.slf4j.Logger |
log
Class logger.
|
AUTHENTICATION_ERROR_KEY, AUTHENTICATION_EXCEPTION_KEY, AUTHENTICATION_INSTANT_KEY, AUTHENTICATION_METHOD_KEY, PRINCIPAL_KEY, PRINCIPAL_NAME_KEY, SUBJECT_KEY| Constructor and Description |
|---|
IPAddressLoginHandler(String user,
List<IPRange> ranges,
boolean isIpInRangeAuthenticated)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
authenticate(InetAddress clientAddress)
Authenticates the client address.
|
void |
login(javax.servlet.http.HttpServletRequest httpRequest,
javax.servlet.http.HttpServletResponse httpResponse)
Authenticate the user making the request.
|
boolean |
supportsForceAuthentication()
Returns if this handler supports the ability to force a user to (re-)authenticate.
|
boolean |
supportsPassive()
Gets whether this handler supports passive authentication.
|
getAuthenticationDuration, getSupportedAuthenticationMethods, setAuthenticationDuration, setAuthenticationDurection, setSupportsForceAuthentication, setSupportsPassiveprivate final org.slf4j.Logger log
private String authenticatedUser
private boolean ipInRangeIsAuthenticated
public IPAddressLoginHandler(String user, List<IPRange> ranges, boolean isIpInRangeAuthenticated)
user - username to return upon successful "authentication"ranges - range of IP addresses specifiedisIpInRangeAuthenticated - whether the specified IP address range represent those that are authenticated or
those that are notpublic boolean supportsPassive()
supportsPassive in interface LoginHandlersupportsPassive in class AbstractLoginHandlerpublic boolean supportsForceAuthentication()
supportsForceAuthentication in interface LoginHandlersupportsForceAuthentication in class AbstractLoginHandlerpublic void login(javax.servlet.http.HttpServletRequest httpRequest,
javax.servlet.http.HttpServletResponse httpResponse)
httpRequest - user requesthttpResponse - response to userprotected boolean authenticate(InetAddress clientAddress)
clientAddress - the client addressCopyright © 1999-2014. All Rights Reserved.