Class ContentTypeConstraintHandler
- java.lang.Object
-
- org.swisspush.gateleen.core.configuration.ConfigurationResourceConsumer
-
- org.swisspush.gateleen.security.content.ContentTypeConstraintHandler
-
- All Implemented Interfaces:
org.swisspush.gateleen.core.configuration.ConfigurationResourceObserver
public class ContentTypeConstraintHandler extends org.swisspush.gateleen.core.configuration.ConfigurationResourceConsumerHandler class for handling Content-Type constraints. The main responsibilities for this handler are:- Manage Content-Type constraint configuration resource
- Grant requests having a Content-Type value matching the always allowed content-types (defaults)
- Refuse requests not matching the default Content-Types or any configured Content-Type
- Author:
- https://github.com/mcweba [Marc-Andre Weber]
-
-
Constructor Summary
Constructors Constructor Description ContentTypeConstraintHandler(org.swisspush.gateleen.core.configuration.ConfigurationResourceManager configurationResourceManager, ContentTypeConstraintRepository repository, java.lang.String configResourceUri)ContentTypeConstraintHandler(org.swisspush.gateleen.core.configuration.ConfigurationResourceManager configurationResourceManager, ContentTypeConstraintRepository repository, java.lang.String configResourceUri, java.util.List<PatternHolder> alwaysAllowedContentTypes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhandle(io.vertx.core.http.HttpServerRequest request)io.vertx.core.Future<java.lang.Void>initialize()booleanisInitialized()voidresourceChanged(java.lang.String resourceUri, io.vertx.core.buffer.Buffer resource)voidresourceRemoved(java.lang.String resourceUri)
-
-
-
Constructor Detail
-
ContentTypeConstraintHandler
public ContentTypeConstraintHandler(org.swisspush.gateleen.core.configuration.ConfigurationResourceManager configurationResourceManager, ContentTypeConstraintRepository repository, java.lang.String configResourceUri, java.util.List<PatternHolder> alwaysAllowedContentTypes)
-
ContentTypeConstraintHandler
public ContentTypeConstraintHandler(org.swisspush.gateleen.core.configuration.ConfigurationResourceManager configurationResourceManager, ContentTypeConstraintRepository repository, java.lang.String configResourceUri)
-
-
Method Detail
-
isInitialized
public boolean isInitialized()
-
initialize
public io.vertx.core.Future<java.lang.Void> initialize()
-
handle
public boolean handle(io.vertx.core.http.HttpServerRequest request)
-
resourceChanged
public void resourceChanged(java.lang.String resourceUri, io.vertx.core.buffer.Buffer resource)
-
resourceRemoved
public void resourceRemoved(java.lang.String resourceUri)
-
-