Package io.undertow.security.handlers
Class SinglePortConfidentialityHandler
- java.lang.Object
-
- io.undertow.security.handlers.AbstractConfidentialityHandler
-
- io.undertow.security.handlers.SinglePortConfidentialityHandler
-
- All Implemented Interfaces:
HttpHandler
public class SinglePortConfidentialityHandler extends AbstractConfidentialityHandler
An extension toAbstractConfidentialityHandlerthat uses the Host header from the incoming message and specifies the confidential address by just switching the port.- Author:
- Darran Lofthouse
-
-
Constructor Summary
Constructors Constructor Description SinglePortConfidentialityHandler(HttpHandler next, int redirectPort)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.net.URIgetRedirectURI(HttpServerExchange exchange)All sub-classes are required to provide an implementation of this method, using the HttpServerExchange for the current request return the address to use for a redirect should confidentiality be required and the request not be confidential.protected java.net.URIgetRedirectURI(HttpServerExchange exchange, int port)-
Methods inherited from class io.undertow.security.handlers.AbstractConfidentialityHandler
confidentialityRequired, handleRequest, isConfidential
-
-
-
-
Constructor Detail
-
SinglePortConfidentialityHandler
public SinglePortConfidentialityHandler(HttpHandler next, int redirectPort)
-
-
Method Detail
-
getRedirectURI
protected java.net.URI getRedirectURI(HttpServerExchange exchange) throws java.net.URISyntaxException
Description copied from class:AbstractConfidentialityHandlerAll sub-classes are required to provide an implementation of this method, using the HttpServerExchange for the current request return the address to use for a redirect should confidentiality be required and the request not be confidential.- Specified by:
getRedirectURIin classAbstractConfidentialityHandler- Parameters:
exchange- - TheHttpServerExchangefor the request being processed.- Returns:
- The
URIto redirect to. - Throws:
java.net.URISyntaxException
-
getRedirectURI
protected java.net.URI getRedirectURI(HttpServerExchange exchange, int port) throws java.net.URISyntaxException
- Throws:
java.net.URISyntaxException
-
-