Diffusion C API 6.12.0
Loading...
Searching...
No Matches
Changing client principal & credentials.

Functions

bool diffusion_reauthenticate (SESSION_T *session, const DIFFUSION_REAUTHENTICATE_PARAMS_T params, DIFFUSION_API_ERROR *api_error)
 Re-authenticate the session.
 
void change_principal (SESSION_T *session, const CHANGE_PRINCIPAL_PARAMS_T params)
 Issue a request to change the principal for the current (active) session.
 
bool diffusion_get_global_permissions (SESSION_T *session, const DIFFUSION_GET_GLOBAL_PERMISSIONS_PARAMS_T params, DIFFUSION_API_ERROR *api_error)
 Query the global permissions assigned to the calling session.
 
bool diffusion_get_path_permissions (SESSION_T *session, const DIFFUSION_GET_PATH_PERMISSIONS_PARAMS_T params, DIFFUSION_API_ERROR *api_error)
 Query the path permissions assigned to the calling session on a given path.
 

Detailed Description

Function Documentation

◆ change_principal()

void change_principal ( SESSION_T session,
const CHANGE_PRINCIPAL_PARAMS_T  params 
)

Issue a request to change the principal for the current (active) session.

Parameters
sessionThe session handle. If NULL, this function has no effect.
paramsParameters defining the change_principal() request and notification callbacks.
Deprecated:
since 6.12. Use the new diffusion_reauthenticate in preference, which allows user proposed session properties to be supplied. This method will be removed in a future release.

◆ diffusion_get_global_permissions()

bool diffusion_get_global_permissions ( SESSION_T session,
const DIFFUSION_GET_GLOBAL_PERMISSIONS_PARAMS_T  params,
DIFFUSION_API_ERROR api_error 
)

Query the global permissions assigned to the calling session.

Parameters
sessionThe session handle. If NULL, this function returns immediately.
paramsParameters describing the diffusion_get_global_permissions request and callback handlers which may be invoked in response.
api_errorPopulated on API error. Can be NULL.
Returns
true if the operation was successful. False, otherwise. In this case, if a non-NULL api_error pointer has been provided, this will be populated with the error information and should be freed with diffusion_api_error_free.

◆ diffusion_get_path_permissions()

bool diffusion_get_path_permissions ( SESSION_T session,
const DIFFUSION_GET_PATH_PERMISSIONS_PARAMS_T  params,
DIFFUSION_API_ERROR api_error 
)

Query the path permissions assigned to the calling session on a given path.

Parameters
sessionThe session handle. If NULL, this function returns immediately.
paramsParameters describing the diffusion_get_path_permissions request and callback handlers which may be invoked in response.
api_errorPopulated on API error. Can be NULL.
Returns
true if the operation was successful. False, otherwise. In this case, if a non-NULL api_error pointer has been provided, this will be populated with the error information and should be freed with diffusion_api_error_free.

◆ diffusion_reauthenticate()

bool diffusion_reauthenticate ( SESSION_T session,
const DIFFUSION_REAUTHENTICATE_PARAMS_T  params,
DIFFUSION_API_ERROR api_error 
)

Re-authenticate the session.

This may be used to change the principal for the session, or to re-authenticate the session before it expires.

A session may determine when it is due to expire by querying the value of the EXPIRY_TIME session property using getSessionProperties. If this property is not present the session will not expire and there is no need to re-authenticate unless the principal in use is to be changed.

Parameters
sessionThe session handle.
paramsParameters defining the request and notification callbacks.
api_errorPopulated on API error. Can be NULL.
Returns
true if the operation was successful. False, otherwise. In this case, if a non-NULL api_error pointer has been provided, this will be populated with the error information and should be freed with diffusion_api_error_free.