Class ServerWebExchangeContext
- java.lang.Object
-
- org.apache.syncope.sra.security.pac4j.ServerWebExchangeContext
-
- All Implemented Interfaces:
org.pac4j.core.context.WebContext
public class ServerWebExchangeContext extends Object implements org.pac4j.core.context.WebContext
-
-
Constructor Summary
Constructors Constructor Description ServerWebExchangeContext(ServerWebExchange exchange)
Build a WebFlux context from the current exchange.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addResponseCookie(org.pac4j.core.context.Cookie cookie)
String
getFullRequestURL()
ServerWebExchange
getNative()
Return the native exchange.String
getPath()
String
getProtocol()
String
getRemoteAddr()
Optional<String>
getRequestAttribute(String name)
String
getRequestContent()
Collection<org.pac4j.core.context.Cookie>
getRequestCookies()
Optional<String>
getRequestHeader(String name)
String
getRequestMethod()
Optional<String>
getRequestParameter(String name)
Map<String,String[]>
getRequestParameters()
Optional<String>
getResponseHeader(String s)
String
getScheme()
String
getServerName()
int
getServerPort()
boolean
isSecure()
ServerWebExchangeContext
setBody(String body)
ServerWebExchangeContext
setForm(MultiValueMap<String,String> form)
void
setRequestAttribute(String name, Object value)
void
setResponseContentType(String content)
void
setResponseHeader(String name, String value)
-
-
-
Constructor Detail
-
ServerWebExchangeContext
public ServerWebExchangeContext(ServerWebExchange exchange)
Build a WebFlux context from the current exchange.- Parameters:
exchange
- the current exchange
-
-
Method Detail
-
getRequestAttribute
public Optional<String> getRequestAttribute(String name)
- Specified by:
getRequestAttribute
in interfaceorg.pac4j.core.context.WebContext
-
setRequestAttribute
public void setRequestAttribute(String name, Object value)
- Specified by:
setRequestAttribute
in interfaceorg.pac4j.core.context.WebContext
-
getRequestParameter
public Optional<String> getRequestParameter(String name)
- Specified by:
getRequestParameter
in interfaceorg.pac4j.core.context.WebContext
-
setForm
public ServerWebExchangeContext setForm(MultiValueMap<String,String> form)
-
getRequestParameters
public Map<String,String[]> getRequestParameters()
- Specified by:
getRequestParameters
in interfaceorg.pac4j.core.context.WebContext
-
getRequestHeader
public Optional<String> getRequestHeader(String name)
- Specified by:
getRequestHeader
in interfaceorg.pac4j.core.context.WebContext
-
getRequestMethod
public String getRequestMethod()
- Specified by:
getRequestMethod
in interfaceorg.pac4j.core.context.WebContext
-
getRemoteAddr
public String getRemoteAddr()
- Specified by:
getRemoteAddr
in interfaceorg.pac4j.core.context.WebContext
-
getNative
public ServerWebExchange getNative()
Return the native exchange.- Returns:
- the native exchange
-
setResponseHeader
public void setResponseHeader(String name, String value)
- Specified by:
setResponseHeader
in interfaceorg.pac4j.core.context.WebContext
-
getResponseHeader
public Optional<String> getResponseHeader(String s)
- Specified by:
getResponseHeader
in interfaceorg.pac4j.core.context.WebContext
-
setResponseContentType
public void setResponseContentType(String content)
- Specified by:
setResponseContentType
in interfaceorg.pac4j.core.context.WebContext
-
getProtocol
public String getProtocol()
- Specified by:
getProtocol
in interfaceorg.pac4j.core.context.WebContext
-
getServerName
public String getServerName()
- Specified by:
getServerName
in interfaceorg.pac4j.core.context.WebContext
-
getServerPort
public int getServerPort()
- Specified by:
getServerPort
in interfaceorg.pac4j.core.context.WebContext
-
getScheme
public String getScheme()
- Specified by:
getScheme
in interfaceorg.pac4j.core.context.WebContext
-
isSecure
public boolean isSecure()
- Specified by:
isSecure
in interfaceorg.pac4j.core.context.WebContext
-
getFullRequestURL
public String getFullRequestURL()
- Specified by:
getFullRequestURL
in interfaceorg.pac4j.core.context.WebContext
-
getRequestCookies
public Collection<org.pac4j.core.context.Cookie> getRequestCookies()
- Specified by:
getRequestCookies
in interfaceorg.pac4j.core.context.WebContext
-
addResponseCookie
public void addResponseCookie(org.pac4j.core.context.Cookie cookie)
- Specified by:
addResponseCookie
in interfaceorg.pac4j.core.context.WebContext
-
getPath
public String getPath()
- Specified by:
getPath
in interfaceorg.pac4j.core.context.WebContext
-
setBody
public ServerWebExchangeContext setBody(String body)
-
getRequestContent
public String getRequestContent()
- Specified by:
getRequestContent
in interfaceorg.pac4j.core.context.WebContext
-
-