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 toAbstractConfidentialityHandler
that 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 URI
getRedirectURI(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 URI
getRedirectURI(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 URI getRedirectURI(HttpServerExchange exchange) throws URISyntaxException
Description copied from class:AbstractConfidentialityHandler
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.- Specified by:
getRedirectURI
in classAbstractConfidentialityHandler
- Parameters:
exchange
- - TheHttpServerExchange
for the request being processed.- Returns:
- The
URI
to redirect to. - Throws:
URISyntaxException
-
getRedirectURI
protected URI getRedirectURI(HttpServerExchange exchange, int port) throws URISyntaxException
- Throws:
URISyntaxException
-
-