Class UserAttributeWorkflowConditionProvider
java.lang.Object
org.keycloak.models.workflow.conditions.UserAttributeWorkflowConditionProvider
- All Implemented Interfaces:
org.keycloak.models.workflow.WorkflowConditionProvider,org.keycloak.provider.Provider
public class UserAttributeWorkflowConditionProvider
extends Object
implements org.keycloak.models.workflow.WorkflowConditionProvider
-
Constructor Summary
ConstructorsConstructorDescriptionUserAttributeWorkflowConditionProvider(org.keycloak.models.KeycloakSession session, String expectedAttribute) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()booleanevaluate(org.keycloak.models.workflow.WorkflowExecutionContext context) org.keycloak.models.workflow.ResourceTypestatic String[]parseKeyValuePair(String keyValuePair) Parses a key-value pair string in the format "key:value" and returns an array containing the key and value.jakarta.persistence.criteria.PredicatetoPredicate(jakarta.persistence.criteria.CriteriaBuilder cb, jakarta.persistence.criteria.CriteriaQuery<String> query, jakarta.persistence.criteria.Root<?> path) voidvalidate()
-
Constructor Details
-
UserAttributeWorkflowConditionProvider
public UserAttributeWorkflowConditionProvider(org.keycloak.models.KeycloakSession session, String expectedAttribute)
-
-
Method Details
-
getSupportedResourceType
public org.keycloak.models.workflow.ResourceType getSupportedResourceType()- Specified by:
getSupportedResourceTypein interfaceorg.keycloak.models.workflow.WorkflowConditionProvider
-
evaluate
public boolean evaluate(org.keycloak.models.workflow.WorkflowExecutionContext context) - Specified by:
evaluatein interfaceorg.keycloak.models.workflow.WorkflowConditionProvider
-
toPredicate
public jakarta.persistence.criteria.Predicate toPredicate(jakarta.persistence.criteria.CriteriaBuilder cb, jakarta.persistence.criteria.CriteriaQuery<String> query, jakarta.persistence.criteria.Root<?> path) - Specified by:
toPredicatein interfaceorg.keycloak.models.workflow.WorkflowConditionProvider
-
validate
public void validate()- Specified by:
validatein interfaceorg.keycloak.models.workflow.WorkflowConditionProvider
-
close
public void close()- Specified by:
closein interfaceorg.keycloak.provider.Provider
-
parseKeyValuePair
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
Stringarray where the first element is the key and the second element is the value.
-