Package org.cyclos.impl.utils
Class RequestInfoWebContext
- java.lang.Object
-
- org.cyclos.impl.utils.RequestInfoWebContext
-
- All Implemented Interfaces:
org.pac4j.core.context.WebContext
public class RequestInfoWebContext extends Object implements org.pac4j.core.context.WebContext
A Pac4jWebContextbuild using the CyclosRequestInfo/ResponseInfo. Also uses a shared state map as Session
-
-
Constructor Summary
Constructors Constructor Description RequestInfoWebContext(RequestInfo request, ResponseInfo response)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddResponseCookie(org.pac4j.core.context.Cookie cookie)StringgetFullRequestURL()StringgetPath()StringgetRemoteAddr()RequestInfogetRequest()Optional<?>getRequestAttribute(String name)Collection<org.pac4j.core.context.Cookie>getRequestCookies()Optional<String>getRequestHeader(String name)StringgetRequestMethod()Optional<String>getRequestParameter(String name)Map<String,String[]>getRequestParameters()Optional<String>getResponseHeader(String name)StringgetScheme()StringgetServerName()intgetServerPort()booleanisSecure()voidsetRequestAttribute(String name, Object value)voidsetResponseContentType(String content)voidsetResponseHeader(String name, String value)
-
-
-
Constructor Detail
-
RequestInfoWebContext
public RequestInfoWebContext(RequestInfo request, ResponseInfo response)
-
-
Method Detail
-
addResponseCookie
public void addResponseCookie(org.pac4j.core.context.Cookie cookie)
- Specified by:
addResponseCookiein interfaceorg.pac4j.core.context.WebContext
-
getFullRequestURL
public String getFullRequestURL()
- Specified by:
getFullRequestURLin interfaceorg.pac4j.core.context.WebContext
-
getPath
public String getPath()
- Specified by:
getPathin interfaceorg.pac4j.core.context.WebContext
-
getRemoteAddr
public String getRemoteAddr()
- Specified by:
getRemoteAddrin interfaceorg.pac4j.core.context.WebContext
-
getRequest
public RequestInfo getRequest()
-
getRequestAttribute
public Optional<?> getRequestAttribute(String name)
- Specified by:
getRequestAttributein interfaceorg.pac4j.core.context.WebContext
-
getRequestCookies
public Collection<org.pac4j.core.context.Cookie> getRequestCookies()
- Specified by:
getRequestCookiesin interfaceorg.pac4j.core.context.WebContext
-
getRequestHeader
public Optional<String> getRequestHeader(String name)
- Specified by:
getRequestHeaderin interfaceorg.pac4j.core.context.WebContext
-
getRequestMethod
public String getRequestMethod()
- Specified by:
getRequestMethodin interfaceorg.pac4j.core.context.WebContext
-
getRequestParameter
public Optional<String> getRequestParameter(String name)
- Specified by:
getRequestParameterin interfaceorg.pac4j.core.context.WebContext
-
getRequestParameters
public Map<String,String[]> getRequestParameters()
- Specified by:
getRequestParametersin interfaceorg.pac4j.core.context.WebContext
-
getResponseHeader
public Optional<String> getResponseHeader(String name)
- Specified by:
getResponseHeaderin interfaceorg.pac4j.core.context.WebContext
-
getScheme
public String getScheme()
- Specified by:
getSchemein interfaceorg.pac4j.core.context.WebContext
-
getServerName
public String getServerName()
- Specified by:
getServerNamein interfaceorg.pac4j.core.context.WebContext
-
getServerPort
public int getServerPort()
- Specified by:
getServerPortin interfaceorg.pac4j.core.context.WebContext
-
isSecure
public boolean isSecure()
- Specified by:
isSecurein interfaceorg.pac4j.core.context.WebContext
-
setRequestAttribute
public void setRequestAttribute(String name, Object value)
- Specified by:
setRequestAttributein interfaceorg.pac4j.core.context.WebContext
-
setResponseContentType
public void setResponseContentType(String content)
- Specified by:
setResponseContentTypein interfaceorg.pac4j.core.context.WebContext
-
-