Search in sources :

Example 11 with PolicyPlugin

use of io.gravitee.plugin.policy.PolicyPlugin in project gravitee-gateway by gravitee-io.

the class RequestInvalidContentTest method register.

@Override
public void register(PolicyPluginManager policyPluginManager) {
    super.register(policyPluginManager);
    PolicyPlugin errorRequestStreamPolicy = PolicyBuilder.build("content-request-error", ValidateRequestPolicy.class);
    policyPluginManager.register(errorRequestStreamPolicy);
    PolicyPlugin errorResponseStreamPolicy = PolicyBuilder.build("content-response-error", ValidateResponsePolicy.class);
    policyPluginManager.register(errorResponseStreamPolicy);
}
Also used : PolicyPlugin(io.gravitee.plugin.policy.PolicyPlugin)

Example 12 with PolicyPlugin

use of io.gravitee.plugin.policy.PolicyPlugin in project gravitee-gateway by gravitee-io.

the class ResponseInvalidContentTest method register.

@Override
public void register(PolicyPluginManager policyPluginManager) {
    super.register(policyPluginManager);
    PolicyPlugin errorResponseStreamPolicy = PolicyBuilder.build("content-response-error", ValidateResponsePolicy.class);
    policyPluginManager.register(errorResponseStreamPolicy);
}
Also used : PolicyPlugin(io.gravitee.plugin.policy.PolicyPlugin)

Example 13 with PolicyPlugin

use of io.gravitee.plugin.policy.PolicyPlugin in project gravitee-gateway by gravitee-io.

the class TransformRequestContentGatewayTest method register.

@Override
public void register(PolicyPluginManager policyPluginManager) {
    super.register(policyPluginManager);
    PolicyPlugin transformRequestContentPolicy = PolicyBuilder.build("transform-request-content", TransformRequestContentPolicy.class);
    policyPluginManager.register(transformRequestContentPolicy);
}
Also used : PolicyPlugin(io.gravitee.plugin.policy.PolicyPlugin)

Example 14 with PolicyPlugin

use of io.gravitee.plugin.policy.PolicyPlugin in project gravitee-gateway by gravitee-io.

the class TransformResponseContentUsingBuilderGatewayTest method register.

@Override
public void register(PolicyPluginManager policyPluginManager) {
    super.register(policyPluginManager);
    PolicyPlugin transformResponseContentPolicy = PolicyBuilder.build("transform-response-content", TransformResponseContentPolicy.class);
    policyPluginManager.register(transformResponseContentPolicy);
}
Also used : PolicyPlugin(io.gravitee.plugin.policy.PolicyPlugin)

Example 15 with PolicyPlugin

use of io.gravitee.plugin.policy.PolicyPlugin in project gravitee-gateway by gravitee-io.

the class AbstractGatewayTest method register.

@Override
public void register(PolicyPluginManager policyPluginManager) {
    PolicyPlugin apiKey = PolicyBuilder.build("api-key", ApiKeyPolicy.class);
    policyPluginManager.register(apiKey);
    PolicyPlugin unsecuredPolicy = PolicyBuilder.build("key-less", KeylessPolicy.class);
    policyPluginManager.register(unsecuredPolicy);
    PolicyPlugin oauth2Policy = PolicyBuilder.build("oauth2", KeylessPolicy.class);
    policyPluginManager.register(oauth2Policy);
    PolicyPlugin jwtPolicy = PolicyBuilder.build("jwt", KeylessPolicy.class);
    policyPluginManager.register(jwtPolicy);
}
Also used : PolicyPlugin(io.gravitee.plugin.policy.PolicyPlugin)

Aggregations

PolicyPlugin (io.gravitee.plugin.policy.PolicyPlugin)15 PluginEntity (io.gravitee.management.model.PluginEntity)2 PolicyDevelopmentEntity (io.gravitee.management.model.PolicyDevelopmentEntity)2 PolicyEntity (io.gravitee.management.model.PolicyEntity)2 PolicyNotFoundException (io.gravitee.management.service.exceptions.PolicyNotFoundException)2 Plugin (io.gravitee.plugin.core.api.Plugin)2 PolicyPluginManager (io.gravitee.plugin.policy.PolicyPluginManager)2 IOException (java.io.IOException)2 Policy (io.gravitee.definition.model.Policy)1 Reactable (io.gravitee.gateway.reactor.Reactable)1 ReactorHandler (io.gravitee.gateway.reactor.handler.ReactorHandler)1 ResourceLifecycleManager (io.gravitee.gateway.resource.ResourceLifecycleManager)1 PolicyService (io.gravitee.management.service.PolicyService)1 TechnicalManagementException (io.gravitee.management.service.exceptions.TechnicalManagementException)1 PluginClassLoader (io.gravitee.plugin.core.api.PluginClassLoader)1 PolicyClassLoaderFactory (io.gravitee.plugin.policy.PolicyClassLoaderFactory)1 PolicyMethodResolver (io.gravitee.plugin.policy.internal.PolicyMethodResolver)1 PolicyContext (io.gravitee.policy.api.PolicyContext)1 Resource (io.gravitee.resource.api.Resource)1 Collection (java.util.Collection)1