## LassoLecp LassoLecp — Liberty Enabled Client and Proxy Profile (ID-FF) |

## Functions

LassoLecp * | lasso_lecp_new ()
lasso_error_t | lasso_lecp_build_authn_request_envelope_msg ()
lasso_error_t | lasso_lecp_build_authn_request_msg ()
lasso_error_t | lasso_lecp_build_authn_response_msg ()
lasso_error_t | lasso_lecp_build_authn_response_envelope_msg ()
void | lasso_lecp_destroy ()
lasso_error_t | lasso_lecp_init_authn_request ()
lasso_error_t | lasso_lecp_process_authn_request_msg ()
lasso_error_t | lasso_lecp_process_authn_request_envelope_msg ()
lasso_error_t | lasso_lecp_process_authn_response_envelope_msg ()

## Types and Values

struct | LassoLecp

## Description

## Functions

### lasso_lecp_new ()

    LassoLecp *
    lasso_lecp_new (LassoServer *server);

Creates a new LassoLecp.

#### Parameters

server | the LassoServer |

#### Returns

a newly created LassoLecp object; or NULL if an error occured

### lasso_lecp_build_authn_request_envelope_msg ()

    lasso_error_t
    lasso_lecp_build_authn_request_envelope_msg
                                   (LassoLecp *lecp);

Builds an enveloped authentication request message. Sets `msg_body` to that message.

#### Parameters

lecp | a LassoLecp |

#### Returns

0 on success; or a negative value otherwise.

### lasso_lecp_build_authn_request_msg ()

    lasso_error_t
    lasso_lecp_build_authn_request_msg (LassoLecp *lecp);

Builds an authentication request. The data for the sending of the request are stored in `msg_url` and `msg_body` (SOAP POST).

#### Parameters

lecp | a LassoLecp |

#### Returns

0 on success; or a negative value otherwise.

### lasso_lecp_build_authn_response_msg ()

    lasso_error_t
    lasso_lecp_build_authn_response_msg (LassoLecp *lecp);

Builds the lecp authentication response message (base64). Sets `msg_body` to that message.

#### Parameters

lecp | a LassoLecp |

#### Returns

0 on success; or a negative value otherwise.

### lasso_lecp_build_authn_response_envelope_msg ()

    lasso_error_t
    lasso_lecp_build_authn_response_envelope_msg
                                   (LassoLecp *lecp);

Builds the enveloped LECP authentication response message (SOAP message). Sets `msg_body` to that message.

#### Parameters

lecp | a LassoLecp |

#### Returns

0 on success; or a negative value otherwise.

### lasso_lecp_destroy ()

    void
    lasso_lecp_destroy (LassoLecp *lecp);

Destroys a LassoLecp object

#### Parameters

lecp | a LassoLecp |

### lasso_lecp_init_authn_request ()

    lasso_error_t
    lasso_lecp_init_authn_request (LassoLecp *lecp,
                                   const char *remote_providerID);

Initializes a new lib:AuthnRequest.

#### Parameters

lecp | a LassoLecp |
remote_providerID | the providerID of the identity provider. When NULL, the first known identity provider is used. |

#### Returns

0 on success; or a negative value otherwise.

### lasso_lecp_process_authn_request_msg ()

    lasso_error_t
    lasso_lecp_process_authn_request_msg (LassoLecp *lecp,
                                          const char *authn_request_msg);

Processes received authentication request, checks it is signed correctly, checks if requested protocol profile is supported, etc.

#### Parameters

lecp | a LassoLecp |
authn_request_msg | the authentication request received |

#### Returns

0 on success; or a negative value otherwise.

### lasso_lecp_process_authn_request_envelope_msg ()

    lasso_error_t
    lasso_lecp_process_authn_request_envelope_msg
                                   (LassoLecp *lecp,
                                    const char *request_msg);

Processes received enveloped authentication request, extracts the authentication request out of it.

#### Parameters

lecp | a LassoLecp |
request_msg | the enveloped authentication request received |

#### Returns

0 on success; or a negative value otherwise.

### lasso_lecp_process_authn_response_envelope_msg ()

    lasso_error_t
    lasso_lecp_process_authn_response_envelope_msg
                                   (LassoLecp *lecp,
                                    const char *response_msg);

Processes received enveloped authentication response, extracts the authentication response out of it and stores it in `response` .

#### Parameters

lecp | a LassoLecp |
response_msg | the enveloped authentication response received |

#### Returns

0 on success; or a negative value otherwise.

## Types and Values

### struct LassoLecp

    struct LassoLecp {
    	LassoLogin parent;

    	LassoLibAuthnRequestEnvelope *authnRequestEnvelope;
    	LassoLibAuthnResponseEnvelope *authnResponseEnvelope;
    	char *assertionConsumerServiceURL;
    };