Interface ClientPolicyConditionProvider<CONFIG extends org.keycloak.representations.idm.ClientPolicyConditionConfigurationRepresentation>
- All Superinterfaces:
org.keycloak.provider.Provider
- All Known Implementing Classes:
AbstractClientPolicyConditionProvider
public interface ClientPolicyConditionProvider<CONFIG extends org.keycloak.representations.idm.ClientPolicyConditionConfigurationRepresentation>
extends org.keycloak.provider.Provider
This condition determines to which client a client policy is adopted.
The condition can be evaluated on the events defined in
ClientPolicyEvent.- Author:
- Takashi Norimatsu
-
Method Summary
Modifier and TypeMethodDescriptiondefault ClientPolicyVoteapplyPolicy(org.keycloak.services.clientpolicy.ClientPolicyContext context) returns ABSTAIN if this condition is not evaluated due to its nature.default voidclose()default StringgetName()booleantells whether the result of applyPolicy method is inverted or not as follows.voidsetupConfiguration(CONFIG config) setup this condition's configuration.
-
Method Details
-
close
default void close()- Specified by:
closein interfaceorg.keycloak.provider.Provider
-
setupConfiguration
setup this condition's configuration.- Parameters:
config-
-
getConditionConfigurationClass
- Returns:
- Class, which should match the "config" argument of the
setupConfiguration(ClientPolicyConditionConfigurationRepresentation)
-
applyPolicy
default ClientPolicyVote applyPolicy(org.keycloak.services.clientpolicy.ClientPolicyContext context) throws org.keycloak.services.clientpolicy.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 inClientPolicyEvent. 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:
org.keycloak.services.clientpolicy.ClientPolicyException
-
isNegativeLogic
boolean isNegativeLogic() throws org.keycloak.services.clientpolicy.ClientPolicyExceptiontells 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- Returns:
- true if the result of applyPolicy method is inverted.
- Throws:
org.keycloak.services.clientpolicy.ClientPolicyException
-
getName
-
getProviderId
String getProviderId()
-