Class UserAttributeWorkflowConditionProvider

java.lang.Object
org.keycloak.models.workflow.conditions.UserAttributeWorkflowConditionProvider
All Implemented Interfaces:
WorkflowConditionProvider, Provider

public class UserAttributeWorkflowConditionProvider extends Object implements WorkflowConditionProvider
  • Constructor Details

    • UserAttributeWorkflowConditionProvider

      public UserAttributeWorkflowConditionProvider(KeycloakSession session, String expectedAttribute)
  • Method Details

    • evaluate

      public boolean evaluate(WorkflowEvent event)
      Specified by:
      evaluate in interface WorkflowConditionProvider
    • validate

      public void validate()
      Specified by:
      validate in interface WorkflowConditionProvider
    • close

      public void close()
      Specified by:
      close in interface Provider
    • parseKeyValuePair

      public static String[] parseKeyValuePair(String keyValuePair)
      Parses a key-value pair string in the format "key:value" and returns an array containing the key and value. It relies on Properties.load to handle edge cases like escaped colons.
      Parameters:
      keyValuePair - the key-value pair string to parse
      Returns:
      a String array where the first element is the key and the second element is the value.