Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The asset variable allows Policy policy instances to access data associated with the asset that is being requested.

...

Description

Checks if the user is in the given role.

Syntax

request.isUserInRole(role)

Example

Expression: request.isUserInRole('admin')

Where the request was made by a user that has the admin role.

Result: true

...

Description

The HTTP method used for this request.

Syntax

request.method

Example

Expression: request.method == 'POST'

Where the request is a POST

Result: true

...

Description

The full path of the request.

Syntax

request.uri.path

Example

Expression: request.uri.path

Result: /api/1/rest/feed/example/shared/HelloTask

...

Description

The query parameters for this request.

Syntax

request.uri.query

Example

Expression: request.uri.query

Result: $name

...

Description

An object that contains the internal properties associated with the request.

Snaplex References

When configuring an OAuth policy scop, you might want to list the Snaplexes. You can use the following functions to do so:

  • For JCC node in a Snaplex: snaplex.jccLoadbalancer

  • For the FeedMaster node in a Snaplex: snaplex.feedMasterLoadbalancer

Syntax

request.properties

Example

Expression:

Result: 

...