Entr'ouvert Entr'ouvert Documentation

LassoIdWsf2Profile

LassoIdWsf2Profile

Synopsis

struct              LassoIdWsf2Profile;
void                lasso_idwsf2_profile_set_epr        (LassoIdWsf2Profile *idwsf2_profile,
                                                         LassoWsAddrEndpointReference *epr);
LassoWsAddrEndpointReference *  lasso_idwsf2_profile_get_epr
                                                        (LassoIdWsf2Profile *idwsf2_profile);
LassoSoapEnvelope *  lasso_idwsf2_profile_get_soap_envelope_request
                                                        (LassoIdWsf2Profile *idwsf2_profile);
LassoSoapEnvelope *  lasso_idwsf2_profile_get_soap_envelope_response
                                                        (LassoIdWsf2Profile *idwsf2_profile);
lasso_error_t       lasso_idwsf2_profile_init_request   (LassoIdWsf2Profile *profile);
lasso_error_t       lasso_idwsf2_profile_build_request_msg
                                                        (LassoIdWsf2Profile *profile,
                                                         const char *security_mech_id);
lasso_error_t       lasso_idwsf2_profile_process_request_msg
                                                        (LassoIdWsf2Profile *profile,
                                                         const char *msg);
lasso_error_t       lasso_idwsf2_profile_check_security_mechanism
                                                        (LassoIdWsf2Profile *profile,
                                                         const char *security_mech_id);
LassoNode *         lasso_idwsf2_profile_get_name_identifier
                                                        (LassoIdWsf2Profile *idwsf2_profile);
lasso_error_t       lasso_idwsf2_profile_init_response  (LassoIdWsf2Profile *profile);
lasso_error_t       lasso_idwsf2_profile_init_soap_fault_response
                                                        (LassoIdWsf2Profile *profile,
                                                         const char *faultcode,
                                                         const char *faultstring,
                                                         GList *details);
lasso_error_t       lasso_idwsf2_profile_redirect_user_for_interaction
                                                        (LassoIdWsf2Profile *profile,
                                                         const gchar *redirect_url,
                                                         gboolean for_data);
lasso_error_t       lasso_idwsf2_profile_build_response_msg
                                                        (LassoIdWsf2Profile *profile);
lasso_error_t       lasso_idwsf2_profile_process_response_msg
                                                        (LassoIdWsf2Profile *profile,
                                                         const char *msg);

Description

Details

struct LassoIdWsf2Profile

struct LassoIdWsf2Profile {
	LassoProfile parent;
};

lasso_idwsf2_profile_set_epr ()

void                lasso_idwsf2_profile_set_epr        (LassoIdWsf2Profile *idwsf2_profile,
                                                         LassoWsAddrEndpointReference *epr);

lasso_idwsf2_profile_get_epr ()

LassoWsAddrEndpointReference *  lasso_idwsf2_profile_get_epr
                                                        (LassoIdWsf2Profile *idwsf2_profile);

Return the EPR used by this profile.

idwsf2_profile :

a LassoIdWsf2Profile object

Returns :

a LassoWsAddrEndpointReference object, or NULL if none is set. [transfer none]

lasso_idwsf2_profile_get_soap_envelope_request ()

LassoSoapEnvelope *  lasso_idwsf2_profile_get_soap_envelope_request
                                                        (LassoIdWsf2Profile *idwsf2_profile);

Return the last parsed SOAP request object.

idwsf2_profile :

a LassoIdWsf2Profile object

Returns :

a LassoSoapEnvelope object or NULL if no request as ever been parsed with this object. You must free this object. [transfer none]

lasso_idwsf2_profile_get_soap_envelope_response ()

LassoSoapEnvelope *  lasso_idwsf2_profile_get_soap_envelope_response
                                                        (LassoIdWsf2Profile *idwsf2_profile);

Return the last parsed SOAP response object.

idwsf2_profile :

a LassoIdWsf2Profile object

Returns :

a LassoSoapEnvelope object or NULL if no response as ever been parsed with this objects. You must free this object. [transfer none]

lasso_idwsf2_profile_init_request ()

lasso_error_t       lasso_idwsf2_profile_init_request   (LassoIdWsf2Profile *profile);

Initialize a new SOAP ID-WSF 2.0 request. Clear the existing request if one is currently set.

profile :

a LassoIdWsf2Profile object

Returns :

0 if successful, an error code otherwise.

lasso_idwsf2_profile_build_request_msg ()

lasso_error_t       lasso_idwsf2_profile_build_request_msg
                                                        (LassoIdWsf2Profile *profile,
                                                         const char *security_mech_id);

Serialize and sign, if needed, the SOAP request message, put the result in

LASSO_PROFILE(profile)->msg_body

.

FIXME: really do sign messages.

profile :

a LassoIdWsf2Profile object

Returns :

0 if successful, LASSO_PROFILE_ERROR_BUILDING_REQUEST_FAILED.

lasso_idwsf2_profile_process_request_msg ()

lasso_error_t       lasso_idwsf2_profile_process_request_msg
                                                        (LassoIdWsf2Profile *profile,
                                                         const char *msg);

Parse a SOAP request message and initialize the SOAP Envelope for the response.

wsf2_profile :

a LassoIdWsf2Profile object

message :

a received SOAP message

Returns :

0 if successful, an error code otherwise among:
  • LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ if profile is not a LassoIdWsf2Profile object,

  • LASSO_PARAM_ERROR_INVALID_VALUE if message is NULL,

  • LASSO_PROFILE_ERROR_INVALID_MSG if we cannot parse the message,

  • LASSO_SOAP_ERROR_MISSING_BODY if the message has no body content.


lasso_idwsf2_profile_check_security_mechanism ()

lasso_error_t       lasso_idwsf2_profile_check_security_mechanism
                                                        (LassoIdWsf2Profile *profile,
                                                         const char *security_mech_id);

Check ID-WSF 2.0 Security Mechanism upon the received request. It is mandatory that a LassoServer is setted for the profile object.

profile :

a LassoIdWsf2Profile object

security_mech_id:(allow-none) :

the security mechanism to enforce, if none is provided Bearer is assumed.

Returns :

0 if the request passed the check, an error code otherwise.

lasso_idwsf2_profile_get_name_identifier ()

LassoNode *         lasso_idwsf2_profile_get_name_identifier
                                                        (LassoIdWsf2Profile *idwsf2_profile);

Return the NameIdentifier found in a WS-Security authentication token, when Bearer or SAML security mechanism is used. This method does not validate any security conditions on the assertion.

idwsf2_profile :

a LassoIdWsf2Profile object

Returns :

a LassoNode object or NULL. [transfer full][allow-none]

lasso_idwsf2_profile_init_response ()

lasso_error_t       lasso_idwsf2_profile_init_response  (LassoIdWsf2Profile *profile);

Initialize a new SOAP ID-WSF 2.0 response. Clear the existing response if one is currently set.

profile :

a LassoIdWsf2Profile object

Returns :

0 if successful, an error code otherwise.

lasso_idwsf2_profile_init_soap_fault_response ()

lasso_error_t       lasso_idwsf2_profile_init_soap_fault_response
                                                        (LassoIdWsf2Profile *profile,
                                                         const char *faultcode,
                                                         const char *faultstring,
                                                         GList *details);

Initialize a new SOAP 1.1 fault.

profile :

a LassoIdWsf2Profile object

faultcode :

a SOAP fault code, see LASSO_SOAP_FAULT_CLIENT, LASSO_SOAP_FAULT_SERVER.

faultstring:(allow-none) :

a human description of the error

details :

complementary data describing the error, you can use LassoIdWsf2UtilStatus. [allow-none][element-type LassoNode]

Returns :

0 if successful, an error code otherwise.

lasso_idwsf2_profile_redirect_user_for_interaction ()

lasso_error_t       lasso_idwsf2_profile_redirect_user_for_interaction
                                                        (LassoIdWsf2Profile *profile,
                                                         const gchar *redirect_url,
                                                         gboolean for_data);

Create a SOAP fault containing a RedirectRequest element, with a redirectURL property set to redirect_url concatenated with the parameter "transactionID" set to the messageID of the response message.

profile :

a LassoIdWsf2Profile object

redirect_url :

an URL where the user must be redirected

Returns :

0 if successful, an error code otherwise.

lasso_idwsf2_profile_build_response_msg ()

lasso_error_t       lasso_idwsf2_profile_build_response_msg
                                                        (LassoIdWsf2Profile *profile);

Serialize and sign the SOAP, if needed, the response message, put the result in

LASSO_PROFILE(profile)->msg_body

.

idwsf2_profile :

a LassoIdWsf2Profile object

Returns :

0 if successful, LASSO_PROFILE_ERROR_BUILDING_RESPONSE_FAILED otherwise.

lasso_idwsf2_profile_process_response_msg ()

lasso_error_t       lasso_idwsf2_profile_process_response_msg
                                                        (LassoIdWsf2Profile *profile,
                                                         const char *msg);

Parse a response received by SOAP. Place the parsed message in the LassoIdWsf2Profile structure in the soap_envelope_response field and the content of the body in the response field.

profile :

a LassoIdWsf2Profile object

message :

a string containing a response message

Returns :

0 if successful, one of those error codes if the call fails:
  • LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ if first parameter is not a LassoIdWsf2Profile object,

  • LASSO_PARAM_ERROR_INVALID_VALUE if message is NULL,

  • LASSO_SOAP_ERROR_MISSING_BODY if no body element is found,

  • LASSO_PROFILE_ERROR_MISSING_RESPONSE if the body element is empty.