/** * <p> * Constructor for adding another policy to be enforced. This constructor makes the assumption * that the input policy should be used as the primary policy. * </p> * * @param policy The policy to configure. * @param useDefaultPolicy Whether to also use the default policy. */ public AuthorizationProviderImpl(Policy policy, boolean useDefaultPolicy) { Policy defaultPolicy = Policy.getPolicy(); Policy.setPolicy(new JaasPolicyCoordinator(defaultPolicy, policy)); Policy.getPolicy().refresh(); }