Package org.wildfly.security.http.impl
Class BaseHttpServerRequest
java.lang.Object
org.wildfly.security.http.impl.BaseHttpServerRequest
- All Implemented Interfaces:
HttpServerRequest,HttpServerScopes
A base implementation of
HttpServerRequest- Author:
- Darran Lofthouse
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns aListcontaining all of theHttpServerCookieobjects the client sent with this request, or an emptyListif no cookies were included in the request.getFirstParameterValue(String name) Get the first value for the parameter specified.getFirstRequestHeaderValue(String headerName) Get the first value for the header specified in the HTTP request.Returns the request input stream.Returns the names of all parameters either from the query string or from the form data where available.Returns the parameters received in the current request.getParameterValues(String name) Return the values for the parameter specified, where a parameter is specified both in the query string and in the form data the query string values will be first in theList.Get the peer certificates established on the connection.Returns a remotely authenticated usergetRequestHeaderValues(String headerName) Get a list of all of the values set for the specified header within the HTTP request.Returns the name of the HTTP method with which this request was made, for example, GET, POST, or PUT.Get the request path.Get the URI representation for the current request.Get the specifiedHttpScopeif available.Get the specifiedHttpScopewith the specified ID.getScopeIds(Scope scope) Get the IDs available for the scope specified.Get the source address of the HTTP request.Get theSSLSession(if any) that has been established for the connection in use.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.wildfly.security.http.HttpServerRequest
authenticationComplete, authenticationComplete, authenticationComplete, authenticationFailed, authenticationFailed, authenticationInProgress, badRequest, badRequest, noAuthenticationInProgress, noAuthenticationInProgress, resumeRequest, setRequestInputStreamSupplier, suspendRequest
-
Constructor Details
-
BaseHttpServerRequest
-
-
Method Details
-
getScope
Description copied from interface:HttpServerScopesGet the specifiedHttpScopeif available.- Specified by:
getScopein interfaceHttpServerScopes- Parameters:
scope- the type of the scope required.- Returns:
- the scope specified or
nullif not supported.
-
getScopeIds
Description copied from interface:HttpServerScopesGet the IDs available for the scope specified.- Specified by:
getScopeIdsin interfaceHttpServerScopes- Parameters:
scope- the scope the IDs are required for.- Returns:
- The IDs available for the scope specified or
nullif the scope specified does not support obtaining scopes by ID.
-
getScope
Description copied from interface:HttpServerScopesGet the specifiedHttpScopewith the specified ID.- Specified by:
getScopein interfaceHttpServerScopes- Parameters:
scope- the type of the scope required.id- the id of the scope instance required.- Returns:
- the scope specified or
nullif not supported or if the scope with that ID does not exist.
-
getRequestHeaderValues
Description copied from interface:HttpServerRequestGet a list of all of the values set for the specified header within the HTTP request.- Specified by:
getRequestHeaderValuesin interfaceHttpServerRequest- Parameters:
headerName- the notnullname of the header the values are required for.- Returns:
- a list of the values set for this header, if the header is not set on the request then
nullshould be returned.
-
getFirstRequestHeaderValue
Description copied from interface:HttpServerRequestGet the first value for the header specified in the HTTP request.- Specified by:
getFirstRequestHeaderValuein interfaceHttpServerRequest- Parameters:
headerName- the notnullname of the header the value is required for.- Returns:
- the value for the first instance of the header specified, if the header is not present then
nullshould be returned instead.
-
getSSLSession
Description copied from interface:HttpServerRequestGet theSSLSession(if any) that has been established for the connection in use. Note that even if this is nullHttpServerRequest.getPeerCertificates()can still return some certificates, as the certificates may have been provided to the underlying server via some external mechanism (such as headers).- Specified by:
getSSLSessionin interfaceHttpServerRequest- Returns:
- the
SSLSession(if any) that has been established for the connection in use, ornullif none exists.
-
getPeerCertificates
Description copied from interface:HttpServerRequestGet the peer certificates established on the connection.- Specified by:
getPeerCertificatesin interfaceHttpServerRequest- Returns:
- the peer certificates established on the connection or
nullif none available.
-
getRemoteUser
Description copied from interface:HttpServerRequestReturns a remotely authenticated user- Specified by:
getRemoteUserin interfaceHttpServerRequest- Returns:
- the remote user principal or
nullif no remote user was authenticated.
-
getRequestMethod
Description copied from interface:HttpServerRequestReturns the name of the HTTP method with which this request was made, for example, GET, POST, or PUT.- Specified by:
getRequestMethodin interfaceHttpServerRequest- Returns:
- a
Stringspecifying the name of the method with which this request was made
-
getRequestURI
Description copied from interface:HttpServerRequestGet the URI representation for the current request.- Specified by:
getRequestURIin interfaceHttpServerRequest- Returns:
- the URI representation for the current request.
-
getRequestPath
Description copied from interface:HttpServerRequestGet the request path. This is the path relative to the context path. E.g.: for a HTTP GET request tohttp://my.appserver.com/my-application/path/sub-paththis method is going to return/path/sub-path.- Specified by:
getRequestPathin interfaceHttpServerRequest- Returns:
- the request path
-
getParameters
Description copied from interface:HttpServerRequestReturns the parameters received in the current request. These parameters will be from both the query string and the form data when available. Where a parameter is named both in the query string and in the form data theListwill contain the values from the query string followed by the values from the form data.- Specified by:
getParametersin interfaceHttpServerRequest- Returns:
- the parameters received in the current request.
-
getParameterNames
Description copied from interface:HttpServerRequestReturns the names of all parameters either from the query string or from the form data where available.- Specified by:
getParameterNamesin interfaceHttpServerRequest- Returns:
- the names of all parameters either from the query string or from the form data where available.
-
getParameterValues
Description copied from interface:HttpServerRequestReturn the values for the parameter specified, where a parameter is specified both in the query string and in the form data the query string values will be first in theList.- Specified by:
getParameterValuesin interfaceHttpServerRequest- Parameters:
name- the name of the desires parameter values.- Returns:
- the values for the parameter specified or
nullif the parameter was not in the request.
-
getFirstParameterValue
Description copied from interface:HttpServerRequestGet the first value for the parameter specified.- Specified by:
getFirstParameterValuein interfaceHttpServerRequest- Parameters:
name- the name of the parameter the first value is required for.- Returns:
- the first value of the named parameter or
nullif the parameter is not available.
-
getCookies
Description copied from interface:HttpServerRequestReturns aListcontaining all of theHttpServerCookieobjects the client sent with this request, or an emptyListif no cookies were included in the request.- Specified by:
getCookiesin interfaceHttpServerRequest- Returns:
- a
Listcontaining all of theHttpServerCookieobjects the client sent with this request, or an emptyListif no cookies were included in the request.
-
getInputStream
Description copied from interface:HttpServerRequestReturns the request input stream.- Specified by:
getInputStreamin interfaceHttpServerRequest- Returns:
- the input stream or
nullif not supported.
-
getSourceAddress
Description copied from interface:HttpServerRequestGet the source address of the HTTP request.- Specified by:
getSourceAddressin interfaceHttpServerRequest- Returns:
- the source address of the HTTP request
-