org.keycloak.services.clientpolicy.condition

## Interface ClientPolicyConditionProvider

- All Superinterfaces:
    Provider
  All Known Implementing Classes:
    ClientAccessTypeCondition, ClientRolesCondition, ClientScopesCondition, ClientUpdateContextCondition, ClientUpdateSourceGroupsCondition, ClientUpdateSourceHostsCondition, ClientUpdateSourceRolesCondition

      public interface ClientPolicyConditionProvider
      extends Provider

  This condition determines to which client a `ClientPolicyProvider` is adopted. The condition can be evaluated on the events defined in `ClientPolicyEvent`. It is sufficient for the implementer of this condition to implement methods in which they are interested and `isEvaluatedOnEvent` method.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default ClientPolicyVote` | `applyPolicy(ClientPolicyContext context)` returns ABSTAIN if this condition is not evaluated due to its nature.
    `default void` | `close()`
    `String` | `getName()`
    `String` | `getProviderId()`

- - ### Method Detail

    - #### close

          default void close()

      Specified by:
        `close` in interface `Provider`

    - #### applyPolicy

          default ClientPolicyVote applyPolicy(ClientPolicyContext context)
                                        throws ClientPolicyException

      returns ABSTAIN if this condition is not evaluated due to its nature. returns YES if the client satisfies this condition on the event defined in `ClientPolicyEvent`. If not, returns NO.
      Parameters:
        `context` - - the context of the event.
      Returns:
        returns ABSTAIN if this condition is not evaluated due to its nature.
      Throws:
        `{@link` - ClientPolicyException} - thrown if the condition is not evaluated in its nature on the event specified by context.
        `ClientPolicyException`

    - #### getName

          String getName()

    - #### getProviderId

          String getProviderId()

Copyright © 2021 JBoss by Red Hat. All rights reserved.