Top |
LassoNameRegistration * | lasso_name_registration_new () |
LassoNameRegistration * | lasso_name_registration_new_from_dump () |
lasso_error_t | lasso_name_registration_build_request_msg () |
lasso_error_t | lasso_name_registration_build_response_msg () |
void | lasso_name_registration_destroy () |
gchar * | lasso_name_registration_dump () |
lasso_error_t | lasso_name_registration_init_request () |
lasso_error_t | lasso_name_registration_process_request_msg () |
lasso_error_t | lasso_name_registration_process_response_msg () |
lasso_error_t | lasso_name_registration_validate_request () |
LassoNameRegistration *
lasso_name_registration_new (LassoServer *server
);
Creates a new LassoNameRegistration.
LassoNameRegistration * lasso_name_registration_new_from_dump (LassoServer *server
,const char *dump
);
Restores the dump
to a new LassoNameRegistration.
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 sets msg_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, sets msg_body
to NULL.
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).
void
lasso_name_registration_destroy (LassoNameRegistration *name_registration
);
Destroys a LassoNameRegistration object.
gchar *
lasso_name_registration_dump (LassoNameRegistration *name_registration
);
Dumps name_registration
content to an XML string.
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.
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.
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.
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.