org.keycloak.services.clientpolicy.condition

## Class AnyClientCondition

- java.lang.Object
- - org.keycloak.services.clientpolicy.condition.AnyClientCondition

- All Implemented Interfaces:
    Provider, ClientPolicyConditionProvider<AnyClientCondition.Configuration>

      public class AnyClientCondition
      extends Object
      implements ClientPolicyConditionProvider<AnyClientCondition.Configuration>

  Author:
    Takashi Norimatsu

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `AnyClientCondition.Configuration`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AnyClientCondition(KeycloakSession session)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ClientPolicyVote` | `applyPolicy(ClientPolicyContext context)` returns ABSTAIN if this condition is not evaluated due to its nature.
    `Class<AnyClientCondition.Configuration>` | `getConditionConfigurationClass()`
    `String` | `getProviderId()`
    `boolean` | `isNegativeLogic()` tells whether the result of applyPolicy method is inverted or not as follows.
    `void` | `setupConfiguration(AnyClientCondition.Configuration config)` setup this condition's configuration.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.keycloak.services.clientpolicy.condition.ClientPolicyConditionProvider

      `close, getName`

- - ### Constructor Detail

    - #### AnyClientCondition

          public AnyClientCondition(KeycloakSession session)

  - ### Method Detail

    - #### setupConfiguration

          public void setupConfiguration(AnyClientCondition.Configuration config)

      Description copied from interface: `ClientPolicyConditionProvider`
      setup this condition's configuration.
      Specified by:
        `setupConfiguration` in interface `ClientPolicyConditionProvider<AnyClientCondition.Configuration>`

    - #### getConditionConfigurationClass

          public Class<AnyClientCondition.Configuration> getConditionConfigurationClass()

      Specified by:
        `getConditionConfigurationClass` in interface `ClientPolicyConditionProvider<AnyClientCondition.Configuration>`
      Returns:
        Class, which should match the "config" argument of the `ClientPolicyConditionProvider.setupConfiguration(ClientPolicyConditionConfiguration)`

    - #### isNegativeLogic

          public boolean isNegativeLogic()

      Description copied from interface: `ClientPolicyConditionProvider`
      tells whether the result of applyPolicy method is inverted or not as follows. ClientPolicyVote.YES is inverted to ClientPolicyVote.NO ClientPolicyVote.NO is inverted to ClientPolicyVote.YES ClientPolicyVote.ABSTAIN remains unchanged
      Specified by:
        `isNegativeLogic` in interface `ClientPolicyConditionProvider<AnyClientCondition.Configuration>`
      Returns:
        true if the result of applyPolicy method is inverted.

    - #### getProviderId

          public String getProviderId()

      Specified by:
        `getProviderId` in interface `ClientPolicyConditionProvider<AnyClientCondition.Configuration>`

    - #### applyPolicy

          public ClientPolicyVote applyPolicy(ClientPolicyContext context)
                                       throws ClientPolicyException

      Description copied from interface: `ClientPolicyConditionProvider`
      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.
      Specified by:
        `applyPolicy` in interface `ClientPolicyConditionProvider<AnyClientCondition.Configuration>`
      Parameters:
        `context` - - the context of the event.
      Returns:
        returns ABSTAIN if this condition is not evaluated due to its nature.
      Throws:
        `ClientPolicyException`

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