OAuth 2.0 scopes policy script API functionality
In addition to the functionality provided by Accessing HTTP Services and Debug logging, OAuth 2.0 policy condition scripts can access some environment properties relating to the authorization request.
This information can then be returned as needed in the response to an authorization request:
Object | Type | Description |
---|---|---|
|
|
Return |
|
|
Describe the environment passed from the client making the authorization request. For example, the following shows an
|
The following JavaScript writes the ID of the OAuth 2.0 client to the debug log, and then authorizes the request:
logger.message("Client ID: " + environment.get("clientId"));
authorized=true;