public class OPASynapseRequestGenerator extends java.lang.Object implements OPARequestGenerator
OPARequestGenerator.| Constructor and Description |
|---|
OPASynapseRequestGenerator() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
generateRequest(java.lang.String policyName,
java.lang.String rule,
java.util.Map<java.lang.String,java.lang.String> additionalParameters,
org.apache.synapse.MessageContext messageContext)
Generate the OPA request payload from the provided message context and the additional Properties Map
|
boolean |
handleResponse(java.lang.String policyName,
java.lang.String rule,
java.lang.String opaResponse,
java.util.Map<java.lang.String,java.lang.String> additionalParameters,
org.apache.synapse.MessageContext messageContext)
Handle the OPA response based on the implementation
|
public java.lang.String generateRequest(java.lang.String policyName,
java.lang.String rule,
java.util.Map<java.lang.String,java.lang.String> additionalParameters,
org.apache.synapse.MessageContext messageContext)
throws OPASecurityException
OPARequestGeneratorgenerateRequest in interface OPARequestGeneratorpolicyName - Name of the policy validatedrule - The rule of the policyadditionalParameters - Additional parameters that can be used to construct the opa payloadmessageContext - The message to be validated with OPA serverOPASecurityException - If an authentication failure or some other error occurspublic boolean handleResponse(java.lang.String policyName,
java.lang.String rule,
java.lang.String opaResponse,
java.util.Map<java.lang.String,java.lang.String> additionalParameters,
org.apache.synapse.MessageContext messageContext)
throws OPASecurityException
OPARequestGeneratorhandleResponse in interface OPARequestGeneratorpolicyName - Name of the policy validatedrule - The rule of the policyopaResponse - The message to be authenticatedadditionalParameters - Additional parameters that can be used to handle the the opa responsemessageContext - The message to be authenticatedOPASecurityException - If an authentication failure or some other error occursCopyright © 2005-2022 Apache Software Foundation. All Rights Reserved.