Class ElytronHttpExchange
- java.lang.Object
-
- org.wildfly.elytron.web.undertow.server.ElytronHttpExchange
-
- All Implemented Interfaces:
org.wildfly.security.http.HttpExchangeSpi,org.wildfly.security.http.HttpServerScopes
public class ElytronHttpExchange extends Object implements org.wildfly.security.http.HttpExchangeSpi
Implementation ofHttpExchangeSpito wrap access to the Undertow specificHttpServerExchange.- Author:
- Darran Lofthouse
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,List<String>>requestParameters
-
Constructor Summary
Constructors Modifier Constructor Description protectedElytronHttpExchange(io.undertow.server.HttpServerExchange httpServerExchange)protectedElytronHttpExchange(io.undertow.server.HttpServerExchange httpServerExchange, Map<org.wildfly.security.http.Scope,Function<io.undertow.server.HttpServerExchange,org.wildfly.security.http.HttpScope>> scopeResolvers, ScopeSessionListener scopeSessionListener)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddResponseHeader(String headerName, String headerValue)voidauthenticationComplete(org.wildfly.security.auth.server.SecurityIdentity securityIdentity, String mechanismName)voidauthenticationFailed(String message, String mechanismName)voidbadRequest(org.wildfly.security.http.HttpAuthenticationException error, String mechanismName)List<org.wildfly.security.http.HttpServerCookie>getCookies()Certificate[]getPeerCertificates(boolean renegotiate)StringgetRemoteUser()List<String>getRequestHeaderValues(String headerName)InputStreamgetRequestInputStream()StringgetRequestMethod()Map<String,List<String>>getRequestParameters()StringgetRequestPath()URIgetRequestURI()OutputStreamgetResponseOutputStream()org.wildfly.security.http.HttpScopegetScope(org.wildfly.security.http.Scope scope)org.wildfly.security.http.HttpScopegetScope(org.wildfly.security.http.Scope scope, String id)Collection<String>getScopeIds(org.wildfly.security.http.Scope scope)protected io.undertow.server.session.SessionConfiggetSessionConfig()Sub-types may override this method to define howSessionConfigis obtained.protected io.undertow.server.session.SessionManagergetSessionManager()Sub-types may override this method to define howSessionManageris obtained.InetSocketAddressgetSourceAddress()SSLSessiongetSSLSession()voidsetResponseCookie(org.wildfly.security.http.HttpServerCookie cookie)voidsetStatusCode(int statusCode)
-
-
-
Constructor Detail
-
ElytronHttpExchange
protected ElytronHttpExchange(io.undertow.server.HttpServerExchange httpServerExchange, Map<org.wildfly.security.http.Scope,Function<io.undertow.server.HttpServerExchange,org.wildfly.security.http.HttpScope>> scopeResolvers, ScopeSessionListener scopeSessionListener)
-
ElytronHttpExchange
protected ElytronHttpExchange(io.undertow.server.HttpServerExchange httpServerExchange)
-
-
Method Detail
-
getRequestHeaderValues
public List<String> getRequestHeaderValues(String headerName)
- Specified by:
getRequestHeaderValuesin interfaceorg.wildfly.security.http.HttpExchangeSpi- See Also:
HttpExchangeSpi.getRequestHeaderValues(java.lang.String)
-
addResponseHeader
public void addResponseHeader(String headerName, String headerValue)
- Specified by:
addResponseHeaderin interfaceorg.wildfly.security.http.HttpExchangeSpi- See Also:
HttpExchangeSpi.addResponseHeader(java.lang.String, java.lang.String)
-
getSSLSession
public SSLSession getSSLSession()
- Specified by:
getSSLSessionin interfaceorg.wildfly.security.http.HttpExchangeSpi- See Also:
HttpExchangeSpi.getSSLSession()
-
getPeerCertificates
public Certificate[] getPeerCertificates(boolean renegotiate)
- Specified by:
getPeerCertificatesin interfaceorg.wildfly.security.http.HttpExchangeSpi
-
authenticationComplete
public void authenticationComplete(org.wildfly.security.auth.server.SecurityIdentity securityIdentity, String mechanismName)- Specified by:
authenticationCompletein interfaceorg.wildfly.security.http.HttpExchangeSpi- See Also:
HttpExchangeSpi.authenticationComplete(SecurityIdentity, String)
-
authenticationFailed
public void authenticationFailed(String message, String mechanismName)
- Specified by:
authenticationFailedin interfaceorg.wildfly.security.http.HttpExchangeSpi- See Also:
HttpExchangeSpi.authenticationFailed(String, String)
-
badRequest
public void badRequest(org.wildfly.security.http.HttpAuthenticationException error, String mechanismName)- Specified by:
badRequestin interfaceorg.wildfly.security.http.HttpExchangeSpi
-
getRequestMethod
public String getRequestMethod()
- Specified by:
getRequestMethodin interfaceorg.wildfly.security.http.HttpExchangeSpi
-
getRequestURI
public URI getRequestURI()
- Specified by:
getRequestURIin interfaceorg.wildfly.security.http.HttpExchangeSpi
-
getRequestPath
public String getRequestPath()
- Specified by:
getRequestPathin interfaceorg.wildfly.security.http.HttpExchangeSpi
-
getRequestParameters
public Map<String,List<String>> getRequestParameters()
- Specified by:
getRequestParametersin interfaceorg.wildfly.security.http.HttpExchangeSpi
-
getCookies
public List<org.wildfly.security.http.HttpServerCookie> getCookies()
- Specified by:
getCookiesin interfaceorg.wildfly.security.http.HttpExchangeSpi
-
getRequestInputStream
public InputStream getRequestInputStream()
- Specified by:
getRequestInputStreamin interfaceorg.wildfly.security.http.HttpExchangeSpi
-
getSourceAddress
public InetSocketAddress getSourceAddress()
- Specified by:
getSourceAddressin interfaceorg.wildfly.security.http.HttpExchangeSpi
-
setResponseCookie
public void setResponseCookie(org.wildfly.security.http.HttpServerCookie cookie)
- Specified by:
setResponseCookiein interfaceorg.wildfly.security.http.HttpExchangeSpi
-
getResponseOutputStream
public OutputStream getResponseOutputStream()
- Specified by:
getResponseOutputStreamin interfaceorg.wildfly.security.http.HttpExchangeSpi
-
getScope
public org.wildfly.security.http.HttpScope getScope(org.wildfly.security.http.Scope scope)
- Specified by:
getScopein interfaceorg.wildfly.security.http.HttpServerScopes
-
getScopeIds
public Collection<String> getScopeIds(org.wildfly.security.http.Scope scope)
- Specified by:
getScopeIdsin interfaceorg.wildfly.security.http.HttpServerScopes
-
getScope
public org.wildfly.security.http.HttpScope getScope(org.wildfly.security.http.Scope scope, String id)- Specified by:
getScopein interfaceorg.wildfly.security.http.HttpServerScopes
-
setStatusCode
public void setStatusCode(int statusCode)
- Specified by:
setStatusCodein interfaceorg.wildfly.security.http.HttpExchangeSpi
-
getRemoteUser
public String getRemoteUser()
- Specified by:
getRemoteUserin interfaceorg.wildfly.security.http.HttpExchangeSpi
-
getSessionManager
protected io.undertow.server.session.SessionManager getSessionManager()
Sub-types may override this method to define howSessionManageris obtained.- Returns:
- the
SessionManager
-
getSessionConfig
protected io.undertow.server.session.SessionConfig getSessionConfig()
Sub-types may override this method to define howSessionConfigis obtained.- Returns:
- the
SessionConfig
-
-