PolicyContext object reference
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 information stored in an OAuthToken object contained within the context map. In this example, an OAuthToken object is retrieved from the policy context by using the oauth_token
key. The OAuthToken object is available only for the OAuth Groovy scripts rules.
Method summary
Method | Description |
---|---|
objectMap<String, Object> getContext() |
Container for the OAuthToken. |
Exchange getExchange() |
Returns the exchange a message relates to. |