olp-cpp-sdk  1.19.0
Public Member Functions | List of all members
olp::authentication::ActionResult Class Reference

Represents each action-resource pair response with an individual policy decision for that action: DENY or ALLOW. More...

#include <AuthorizeResult.h>

Public Member Functions

const DecisionTypeGetDecision () const
 Gets the overall policy decision. More...
 
void SetDecision (DecisionType decision)
 Sets the policy decision. More...
 
const std::vector< Permission > & GetPermissions () const
 Gets the list of permissions that are evaluated against the action and resource. More...
 
void SetPermissions (std::vector< Permission > permissions)
 Sets the list of permissions. More...
 

Detailed Description

Represents each action-resource pair response with an individual policy decision for that action: DENY or ALLOW.

Note
The data is present only if the diagnostics flag is true for DecisionRequest.

Member Function Documentation

◆ GetDecision()

const DecisionType& olp::authentication::ActionResult::GetDecision ( ) const
inline

Gets the overall policy decision.

See also
DecisionOperatorType for more information.
Returns
The decision based on the operator type.

◆ GetPermissions()

const std::vector<Permission>& olp::authentication::ActionResult::GetPermissions ( ) const
inline

Gets the list of permissions that are evaluated against the action and resource.

Note
The algorithm of evaluating each permission in the set against the action and resource:
  • If the action matches the action in the permission, and the resource matches the resource in the permission, consider the permission.
  • If ANY considered permission for the action results in DENY, the individual policy decision for the action is DENY.
  • If ALL considered permissions for the action result in ALLOW, the individual policy decision for the action is ALLOW.
Returns
The list of permissions.

◆ SetDecision()

void olp::authentication::ActionResult::SetDecision ( DecisionType  decision)
inline

Sets the policy decision.

Parameters
decisionThe policy decision.

◆ SetPermissions()

void olp::authentication::ActionResult::SetPermissions ( std::vector< Permission permissions)
inline

Sets the list of permissions.

Parameters
permissionsThe vector of the action-decision pair.

The documentation for this class was generated from the following file: