public class ServletClientInfo extends Object implements ClientInfo
HttpServletRequest
instance to the ClientInfo
interface.Constructor and Description |
---|
ServletClientInfo(javax.servlet.http.HttpServletRequest request)
Builds a ServletClientInfo wrapping the given request.
|
Modifier and Type | Method and Description |
---|---|
List<X509Certificate> |
getCertificates()
Returns the list (possibly empty) of X509 certificate(s) provided by the client.
|
String |
getRemoteAddress()
Returns the IP address of the client (or last proxy) that sent the request.
|
String |
getRemoteHost()
Returns the fully qualified name of the client (or last proxy) that sent the request.
|
int |
getRemotePort()
Returns the source port of the client (or last proxy) that sent the request.
|
String |
getRemoteUser()
Returns the login of the user making this request or
null if not known. |
String |
getUserAgent()
Returns the value of the User-Agent HTTP Header (if any, returns
null otherwise). |
public ServletClientInfo(javax.servlet.http.HttpServletRequest request)
request
- adapted servlet requestpublic String getRemoteUser()
ClientInfo
null
if not known.getRemoteUser
in interface ClientInfo
null
if not known.HttpServletRequest.getRemoteUser()
public String getRemoteAddress()
ClientInfo
getRemoteAddress
in interface ClientInfo
ServletRequest.getRemoteAddr()
public String getRemoteHost()
ClientInfo
getRemoteHost
in interface ClientInfo
ServletRequest.getRemoteHost()
public int getRemotePort()
ClientInfo
getRemotePort
in interface ClientInfo
ServletRequest.getRemotePort()
public List<X509Certificate> getCertificates()
ClientInfo
getCertificates
in interface ClientInfo
public String getUserAgent()
ClientInfo
null
otherwise).getUserAgent
in interface ClientInfo
null
otherwise).Copyright © 2014 ForgeRock AS. All rights reserved.