Access the PolicyContext object in Groovy policyCtx
.
Purpose
The PolicyContext object is a map of objects needed to perform policy decisions. The
contents of the map vary based on the context of the current user flow. A common
example is oauth_token
key. The
OAuthToken object is available only for the OAuth Groovy scripts rules.
Groovy sample
def oauthToken = policyCtx?.context.get("oauth_token")
Method summary
Method | Description |
---|---|
objectMap<String, Object> getContext() |
Container for the OAuthToken. |
Exchange getExchange() |
Returns the exchange a message relates to. |