org.keycloak.services.clientpolicy.condition

## Class ClientUpdaterSourceHostsCondition

- java.lang.Object
- - org.keycloak.services.clientpolicy.condition.AbstractClientPolicyConditionProvider<ClientUpdaterSourceHostsCondition.Configuration>
  - - org.keycloak.services.clientpolicy.condition.ClientUpdaterSourceHostsCondition

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

      public class ClientUpdaterSourceHostsCondition
      extends AbstractClientPolicyConditionProvider<ClientUpdaterSourceHostsCondition.Configuration>

  Author:
    Takashi Norimatsu

- - ### Nested Class Summary

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

  - ### Field Summary

    - ### Fields inherited from class org.keycloak.services.clientpolicy.condition.AbstractClientPolicyConditionProvider

      `configuration, session`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClientUpdaterSourceHostsCondition(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<ClientUpdaterSourceHostsCondition.Configuration>` | `getConditionConfigurationClass()`
    `String` | `getProviderId()`
    `protected List<String>` | `getTrustedDomains()`
    `protected List<String>` | `getTrustedHosts()`
    `protected String` | `verifyHostInTrustedDomains(String hostAddress, List<String> trustedDomains)`
    `protected String` | `verifyHostInTrustedHosts(String hostAddress, List<String> trustedHosts)`

    - ### Methods inherited from class org.keycloak.services.clientpolicy.condition.AbstractClientPolicyConditionProvider

      `isNegativeLogic, setupConfiguration`

    - ### 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

    - #### ClientUpdaterSourceHostsCondition

          public ClientUpdaterSourceHostsCondition(KeycloakSession session)

  - ### Method Detail

    - #### getConditionConfigurationClass

          public Class<ClientUpdaterSourceHostsCondition.Configuration> getConditionConfigurationClass()

      Returns:
        Class, which should match the "config" argument of the `ClientPolicyConditionProvider.setupConfiguration(ClientPolicyConditionConfigurationRepresentation)`

    - #### getProviderId

          public String getProviderId()

    - #### 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.
      Parameters:
        `context` - - the context of the event.
      Returns:
        returns ABSTAIN if this condition is not evaluated due to its nature.
      Throws:
        `ClientPolicyException`

    - #### getTrustedHosts

          protected List<String> getTrustedHosts()

    - #### getTrustedDomains

          protected List<String> getTrustedDomains()

    - #### verifyHostInTrustedHosts

          protected String verifyHostInTrustedHosts(String hostAddress,
                                                    List<String> trustedHosts)

    - #### verifyHostInTrustedDomains

          protected String verifyHostInTrustedDomains(String hostAddress,
                                                      List<String> trustedDomains)

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