LOM2M  0.8.0
Functions
AccessControlController.cpp File Reference
#include "AccessControlController.h"
#include <regex>

Functions

int checkACP (std::list< AccessControlPolicy * > acpList, const String &originator, Operation operation, bool checkSelfPrivileges)
 
int checkAccessRights (Entity *entity, const RequestPrimitive &req)
 

Function Documentation

◆ checkAccessRights()

int checkAccessRights ( Entity entity,
const RequestPrimitive req 
)

Checks the Access Right based on ACP list of Entity (Permission)

Parameters
Entity: target entity
RequestPrimitive: enables to get the operation and originator
Returns
error with a specific status code if the requesting Entity or the method does not exist otherwise null

◆ checkACP()

int checkACP ( std::list< AccessControlPolicy * >  acpList,
const String &  originator,
Operation  operation,
bool  checkSelfPrivileges = false 
)

Checks the Access Right based on ACP list (Permission)

Parameters
acp- Id of the accessRight
originator- requesting entity used by the requester
operation- requested method
Returns
error with a specific status code if the requesting Entity or the method does not exist otherwise null