|
Liberator Auth API
8.0.16.562453-f926412a
|
![]() |
Functions | |
| char * | object_get_value (object_t *obj, int32_t fieldnum, char *buf, int len) |
| The function returns the value of a specified field in an object. More... | |
Content-based permissioning works by allowing users to see an object only if the object contains a certain value in one of its fields, as opposed to subject-based permissioning, which allows users to see an object based on the symbol name.
Example to illustrate content based permissioning
| char* object_get_value | ( | object_t * | obj, |
| int32_t | fieldnum, | ||
| char * | buf, | ||
| int | len | ||
| ) |
The function returns the value of a specified field in an object.
| obj | The RTTP object |
| fieldnum | The number of the field |
| buf | Buffer to store the value |
| len | Length of the buffer |
| NULL | - The field does not exist |
| buffer | - buffer contains the field value |
By calling object_get_value() in _authfuncs::auth_check_read(), you can find the value of a particular field. However, if working with an active source, it is possible that the value may be unavailable (i.e. object->type for the value is 200). In such circumstances, _authfuncs::auth_check_read() may return AUTH_AGAIN and _authfuncs::auth_check_read() will be called again when the first update is received.