![]() |
![]() |
![]() |
Lasso Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <lasso/lasso.h> LassoIdWsf2DataService; LassoIdWsf2DataService* lasso_idwsf2_data_service_new (LassoServer *server); LassoIdWsf2DataService* lasso_idwsf2_data_service_new_full (LassoServer *server,LassoWsAddrEndpointReference *epr);gint lasso_idwsf2_data_service_init_query (LassoIdWsf2DataService *service);gint lasso_idwsf2_data_service_add_query_item (LassoIdWsf2DataService *service, constgchar *item_xpath, constgchar *item_id);gint lasso_idwsf2_data_service_process_query_msg (LassoIdWsf2DataService *service, constgchar *message);gint lasso_idwsf2_data_service_parse_query_items (LassoIdWsf2DataService *service);gint lasso_idwsf2_data_service_process_query_response_msg (LassoIdWsf2DataService *service, constgchar *message);GList * lasso_idwsf2_data_service_get_attribute_nodes (LassoIdWsf2DataService *service, constgchar *item_id);xmlNode * lasso_idwsf2_data_service_get_attribute_node (LassoIdWsf2DataService *service, constgchar *item_id);GList * lasso_idwsf2_data_service_get_attribute_strings (LassoIdWsf2DataService *service, constgchar *item_id);gchar * lasso_idwsf2_data_service_get_attribute_string (LassoIdWsf2DataService *service, constgchar *item_id);gint lasso_idwsf2_data_service_init_redirect_user_for_consent (LassoIdWsf2DataService *service, constgchar *redirect_url);gint lasso_idwsf2_data_service_init_modify (LassoIdWsf2DataService *service);gint lasso_idwsf2_data_service_add_modify_item (LassoIdWsf2DataService *service, constgchar *item_xpath, constgchar *item_id, constgchar *new_data,gboolean overrideAllowed);gint lasso_idwsf2_data_service_process_modify_msg (LassoIdWsf2DataService *service, constgchar *message);gint lasso_idwsf2_data_service_parse_modify_items (LassoIdWsf2DataService *service);gint lasso_idwsf2_data_service_process_modify_response_msg (LassoIdWsf2DataService *service, constgchar *message);
DataService allows Attribute Consumers (WSC) to request an Attribute Provider (WSP) to get or modify data about users with their consent.
typedef struct { LassoIdWsf2Profile parent; xmlNode *data; gchar *type; gchar *redirect_url; GList *query_items; /* of strings */ } LassoIdWsf2DataService;
LassoIdWsf2DataService* lasso_idwsf2_data_service_new (LassoServer *server);
Create a new LassoIdWsf2DataService.
|
the LassoServer |
Returns : |
a newly created LassoIdWsf2DataService object |
LassoIdWsf2DataService* lasso_idwsf2_data_service_new_full (LassoServer *server,LassoWsAddrEndpointReference *epr);
Create a new LassoIdWsf2DataService.
|
the LassoServer |
|
the |
Returns : |
a newly created LassoIdWsf2DataService object; or NULL if an error occured. |
gint lasso_idwsf2_data_service_init_query (LassoIdWsf2DataService *service);
Initialise an ID-WSF 2.0 DataService query request.
|
a LassoIdWsf2DataService |
Returns : |
0 on success; or a negative value otherwise. |
gint lasso_idwsf2_data_service_add_query_item (LassoIdWsf2DataService *service, constgchar *item_xpath, constgchar *item_id);
Add an item in the query request.
|
a LassoIdWsf2DataService |
|
XPATH of the queried item |
|
identifier of the queried item, which will allow to retrieve it in the response |
Returns : |
0 on success; or a negative value otherwise. |
gint lasso_idwsf2_data_service_process_query_msg (LassoIdWsf2DataService *service, constgchar *message);
Process received query request.
Parse query items and put the list of queried XPATH into service->query_items
.
|
a LassoIdWsf2DataService |
|
received query soap request |
Returns : |
0 on success; or a negative value otherwise. |
gint lasso_idwsf2_data_service_parse_query_items (LassoIdWsf2DataService *service);
Parse query items and user data from service->data
and fill response->Data accordingly.
Set response status code to OK is all items were parsed correctly, FAILED if no item was parsed
correctly, or PARTIAL if some items were parsed corretly and some others not.
|
a LassoIdWsf2DataService |
Returns : |
0 on success; or a negative value otherwise. |
gint lasso_idwsf2_data_service_process_query_response_msg (LassoIdWsf2DataService *service, constgchar *message);
Process received query response. Check if the response if a normal response or a soap fault. Check response status code.
|
a LassoIdWsf2DataService |
|
received query soap response |
Returns : |
0 on success; or a negative value otherwise. |
GList * lasso_idwsf2_data_service_get_attribute_nodes (LassoIdWsf2DataService *service, constgchar *item_id);
Get one of several items for specified item_id
and return them raw as a list of xmlnodes.
|
a LassoIdWsf2DataService |
|
identifier of the item to retrieve |
Returns : |
a list of xmlnodes; or NULL if no item with the specified item_id was found.
|
xmlNode * lasso_idwsf2_data_service_get_attribute_node (LassoIdWsf2DataService *service, constgchar *item_id);
Get one item for specified item_id
and return it raw as an xmlnode.
|
a LassoIdWsf2DataService |
|
identifier of the item to retrieve |
Returns : |
an xmlnode; or NULL if no item with the specified item_id was found.
|
GList * lasso_idwsf2_data_service_get_attribute_strings (LassoIdWsf2DataService *service, constgchar *item_id);
Get one of several items for specified item_id
and return their content as a list of strings.
|
a LassoIdWsf2DataService |
|
identifier of the item to retrieve |
Returns : |
a list of strings; or NULL if no item with the specified item_id was found.
|
gchar * lasso_idwsf2_data_service_get_attribute_string (LassoIdWsf2DataService *service, constgchar *item_id);
Get one item for specified item_id
and return its content as a string.
|
a LassoIdWsf2DataService |
|
identifier of the item to retrieve |
Returns : |
a string; or NULL if no item with the specified item_id was found.
|
gint lasso_idwsf2_data_service_init_redirect_user_for_consent (LassoIdWsf2DataService *service, constgchar *redirect_url);
Initialise a soap fault response to ask the requesting service to redirect to the redirect_url
.
|
a LassoIdWsf2DataService |
|
URL to ask for redirection |
Returns : |
0 on success; or a negative value otherwise. |
gint lasso_idwsf2_data_service_init_modify (LassoIdWsf2DataService *service);
Initialise an ID-WSF 2.0 DataService modify request.
|
a LassoIdWsf2DataService |
Returns : |
0 on success; or a negative value otherwise. |
gint lasso_idwsf2_data_service_add_modify_item (LassoIdWsf2DataService *service, constgchar *item_xpath, constgchar *item_id, constgchar *new_data,gboolean overrideAllowed);
Add an item in the modification request.
|
a LassoIdWsf2DataService |
|
XPATH of the item to modify |
|
identifier of the item to modify |
|
new value for the selected item |
|
FALSE means only allowing to create a new item, but not modify existing one, TRUE means allowing to modify existing item |
Returns : |
0 on success; or a negative value otherwise. |
gint lasso_idwsf2_data_service_process_modify_msg (LassoIdWsf2DataService *service, constgchar *message);
Process received modify request.
|
a LassoIdWsf2DataService |
|
received modify soap request |
Returns : |
0 on success; or a negative value otherwise. |
gint lasso_idwsf2_data_service_parse_modify_items (LassoIdWsf2DataService *service);
Parse modify items and modify service->data
accordingly.
|
a LassoIdWsf2DataService |
Returns : |
0 on success; or a negative value otherwise. |
gint lasso_idwsf2_data_service_process_modify_response_msg (LassoIdWsf2DataService *service, constgchar *message);
Process received modify response. Check response status code.
|
a LassoIdWsf2DataService |
|
received modify soap response |
Returns : |
0 on success; or a negative value otherwise. |