Lasso Reference Manual | ||||
---|---|---|---|---|
Top | Description |
Synopsis
struct LassoNameRegistration; LassoNameRegistration * lasso_name_registration_new (LassoServer *server
); LassoNameRegistration * lasso_name_registration_new_from_dump (LassoServer *server
,const char *dump
); lasso_error_t lasso_name_registration_build_request_msg (LassoNameRegistration *name_registration
); lasso_error_t lasso_name_registration_build_response_msg (LassoNameRegistration *name_registration
); void lasso_name_registration_destroy (LassoNameRegistration *name_registration
); gchar * lasso_name_registration_dump (LassoNameRegistration *name_registration
); lasso_error_t lasso_name_registration_init_request (LassoNameRegistration *name_registration
,char *remote_providerID
,LassoHttpMethod http_method
); lasso_error_t lasso_name_registration_process_request_msg (LassoNameRegistration *name_registration
,gchar *request_msg
); lasso_error_t lasso_name_registration_process_response_msg (LassoNameRegistration *name_registration
,gchar *response_msg
); lasso_error_t lasso_name_registration_validate_request (LassoNameRegistration *name_registration
);
Details
struct LassoNameRegistration
struct LassoNameRegistration { LassoProfile parent; LassoSamlNameIdentifier *oldNameIdentifier; };
lasso_name_registration_new ()
LassoNameRegistration * lasso_name_registration_new (LassoServer *server
);
Creates a new LassoNameRegistration.
|
the LassoServer |
Returns : |
a newly created LassoNameRegistration object; or NULL if an error occured |
lasso_name_registration_new_from_dump ()
LassoNameRegistration * lasso_name_registration_new_from_dump (LassoServer *server
,const char *dump
);
Restores the dump
to a new LassoNameRegistration.
|
the LassoServer |
|
XML logout dump |
Returns : |
a newly created LassoNameRegistration; or NULL if an error occured |
lasso_name_registration_build_request_msg ()
lasso_error_t lasso_name_registration_build_request_msg
(LassoNameRegistration *name_registration
);
Builds a register name identifier request message.
It gets the register name identifier protocol profile and:
if it is a SOAP method, then it builds the register name identifier request SOAP message, optionally signs his node, sets
msg_body
, gets the SoapEndpoint url and setsmsg_url
.if it is a HTTP-Redirect method, then it builds the register name identifier request QUERY message (optionally signs the request message), builds the request url with register name identifier url with register name identifier service url, sets
msg_url
in the register name identifier object, setsmsg_body
to NULL.
|
a LassoNameRegistration |
Returns : |
0 on success; or a negative value otherwise. |
lasso_name_registration_build_response_msg ()
lasso_error_t lasso_name_registration_build_response_msg
(LassoNameRegistration *name_registration
);
Builds the register name idendifier response message.
It gets the request message method and:
if it is a SOAP method, then it builds the response SOAP message, sets the msg_body attribute, gets the register name identifier service return url and sets
msg_url
of the object.if it is a HTTP-Redirect method, then it builds the response QUERY message, builds the response url, sets
msg_url
with the response url and sets the msg_body with NULL
If private key and certificate are set in server object it will also signs the message (either with X509 if SOAP or with a simple signature for query strings).
|
a LassoNameRegistration |
Returns : |
0 on success; or a negative value otherwise. |
lasso_name_registration_destroy ()
void lasso_name_registration_destroy (LassoNameRegistration *name_registration
);
Destroys a LassoNameRegistration object.
|
a LassoNameRegistration |
lasso_name_registration_dump ()
gchar * lasso_name_registration_dump (LassoNameRegistration *name_registration
);
Dumps name_registration
content to an XML string.
|
a LassoNameRegistration |
Returns : |
the dump string. It must be freed by the caller. [transfer full] |
lasso_name_registration_init_request ()
lasso_error_t lasso_name_registration_init_request (LassoNameRegistration *name_registration
,char *remote_providerID
,LassoHttpMethod http_method
);
Initializes a new lib:RegisterNameIdentifierRequest request; it sets
name_registration->nameIdentifier
to the new name identifier and
name_registration->oldNameIdentifier
to the old one.
|
a LassoNameRegistration |
|
the providerID of the identity provider. |
|
if set, then it get the protocol profile in metadata corresponding of this HTTP request method. |
Returns : |
0 on success; or a negative value otherwise. |
lasso_name_registration_process_request_msg ()
lasso_error_t lasso_name_registration_process_request_msg (LassoNameRegistration *name_registration
,gchar *request_msg
);
Processes a lib:RegisterNameIdentifierRequest message. Rebuilds a request object from the message and optionally verifies its signature. Sets profile->nameIdentifier to local name identifier. If it changed (when this is IdP-initiated and there was no previously defined local name identifier) profile->nameIdentifier will be the new one and profile->oldNameIdentiifer the old one.
|
a LassoNameRegistration |
|
the register name identifier request message |
Returns : |
0 on success; or a negative value otherwise. |
lasso_name_registration_process_response_msg ()
lasso_error_t lasso_name_registration_process_response_msg (LassoNameRegistration *name_registration
,gchar *response_msg
);
Processes a lib:RegisterNameIdentifierResponse message. Rebuilds a response object from the message and optionally verifies its signature.
If the response depicts Success it will also update Principal federation.
|
a LassoNameRegistration |
|
the register name identifier response message |
Returns : |
0 on success; or a negative value otherwise. |
lasso_name_registration_validate_request ()
lasso_error_t lasso_name_registration_validate_request
(LassoNameRegistration *name_registration
);
Checks profile request with regards to message status and principal federations, update them accordingly and prepares a lib:RegisterNameIdentifierResponse accordingly.
|
a LassoNameRegistration |
Returns : |
0 on success; or a negative value otherwise. |