Package com.styra.opa.springboot
Class OPAResponseContext
java.lang.Object
com.styra.opa.springboot.OPAResponseContext
This class models the data to be returned from an OPA policy under the
This corresponds to the
context
key.
This corresponds to the
Context
object in the
AuthZen spec.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetReasonForDecision
(String searchKey) This method selects an appropriate reason to use for creatingAuthorizationDecision
s.
-
Constructor Details
-
OPAResponseContext
public OPAResponseContext()
-
-
Method Details
-
getReasonForDecision
This method selects an appropriate reason to use for creatingAuthorizationDecision
s. Currently, it will select the search key if it is present in thereasonUser
, and if not it will select the key which sorts lexicographically first from thereasonUser
. It will not consider data in thereasonAdmin
.
-