public class IPAuthenticationProvider extends Object implements AuthenticationProvider
| Modifier and Type | Field and Description |
|---|---|
static String |
USE_X_FORWARDED_FOR_KEY |
static String |
X_FORWARDED_FOR_HEADER_NAME |
| Constructor and Description |
|---|
IPAuthenticationProvider() |
| Modifier and Type | Method and Description |
|---|---|
static String |
getClientIPAddress(javax.servlet.http.HttpServletRequest request)
Returns the HTTP(s) client IP address
|
String |
getScheme()
The String used to represent this provider.
|
List<Id> |
handleAuthentication(javax.servlet.http.HttpServletRequest request,
byte[] authData)
This method is called when admin server command passes authentication data for this
scheme.
|
KeeperException.Code |
handleAuthentication(ServerCnxn cnxn,
byte[] authData)
This method is called when a client passes authentication data for this
scheme.
|
boolean |
isAuthenticated()
This method is used to check if the authentication done by this provider
should be used to identify the creator of a node.
|
boolean |
isValid(String id)
Validates the syntax of an id.
|
boolean |
matches(String id,
String aclExpr)
This method is called to see if the given id matches the given id
expression in the ACL.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetUserNamepublic static final String X_FORWARDED_FOR_HEADER_NAME
public static final String USE_X_FORWARDED_FOR_KEY
public String getScheme()
AuthenticationProvidergetScheme in interface AuthenticationProviderpublic KeeperException.Code handleAuthentication(ServerCnxn cnxn, byte[] authData)
AuthenticationProviderhandleAuthentication in interface AuthenticationProvidercnxn - the cnxn that received the authentication information.authData - the authentication data received.public List<Id> handleAuthentication(javax.servlet.http.HttpServletRequest request, byte[] authData)
AuthenticationProviderhandleAuthentication in interface AuthenticationProviderrequest - the request that contains the authentication information.authData - the authentication data received.public boolean matches(String id, String aclExpr)
AuthenticationProvidermatches in interface AuthenticationProviderid - the id to check.aclExpr - the expression to match ids against.public boolean isAuthenticated()
AuthenticationProviderisAuthenticated in interface AuthenticationProviderpublic boolean isValid(String id)
AuthenticationProviderisValid in interface AuthenticationProviderid - the id to validate.public static String getClientIPAddress(javax.servlet.http.HttpServletRequest request)
request - HttpServletRequestCopyright © 2008–2026 The Apache Software Foundation. All rights reserved.