public interface BaseSecurityPolicy
extends BasePolicy
BaseSecurityPolicy is a base that can be used for securing declaring a security policy.
A security policy is a special policy that is able to work with the concept of a Gravitee plan and can require a subscription.
Implementing a BaseSecurityPolicy requires implementing some additional behavior in order to be used by the gateway during the security chain execution that will identify which plan the consumer is using:
order(): to define the priority compared to other security policies
Security policy can be used together with a plan that requires a subscription.
By enabling the subscription requirement, the gateway will automatically validate the subscription associated with the current request and reject the request if the subscription is invalid.
Returns:
true to indicates to check the subscription after the security policy has been successfully executed, false else.
order
defaultintorder()
Defines the priority order of the security policy compared to others.
By default, it is set to DEFAULT_ORDER. The lower is the order, the highest is the priority of the policy compared to other.
The order is not guaranteed when 2 BaseSecurityPolicy have the same order.
Returns:
the order of the security policy when multiple security policies can be involved.