Class OPAResponse

java.lang.Object
com.styra.opa.springboot.OPAResponse

public class OPAResponse extends Object
This class models the data to be returned from an OPA Spring Boot SDK policy. The structure of the response is defined by the AuthZEN spec (https://openid.github.io/authzen).
  • Constructor Details

    • OPAResponse

      public OPAResponse()
  • Method Details

    • getDecision

      public boolean getDecision()
    • setDecision

      public void setDecision(boolean newDecision)
    • getContext

      public OPAResponseContext getContext()
    • setContext

      public void setContext(OPAResponseContext newContext)
    • getReasonForDecision

      public String getReasonForDecision(String searchKey)
      Wraps OPAResponseContext.getReasonForDecision(). If the context is omitted (which the spec permits), then it returns null.