LassoNameIdentifierMapping: lasso Reference Manual

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

## Functions

LassoNameIdentifierMapping * | lasso_name_identifier_mapping_new ()
lasso_error_t | lasso_name_identifier_mapping_build_request_msg ()
lasso_error_t | lasso_name_identifier_mapping_build_response_msg ()
void | lasso_name_identifier_mapping_destroy ()
lasso_error_t | lasso_name_identifier_mapping_init_request ()
lasso_error_t | lasso_name_identifier_mapping_process_request_msg ()
lasso_error_t | lasso_name_identifier_mapping_process_response_msg ()
lasso_error_t | lasso_name_identifier_mapping_validate_request ()

## Types and Values

struct | LassoNameIdentifierMapping

## Object Hierarchy

        GObject
        ╰── LassoNode
            ╰── LassoProfile
                ╰── LassoNameIdentifierMapping

## Description

## Functions

### lasso_name_identifier_mapping_new ()

    LassoNameIdentifierMapping *
    lasso_name_identifier_mapping_new (LassoServer *server);

Creates a new LassoNameIdentifierMapping.

#### Parameters

server | the LassoServer |

#### Returns

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

### lasso_name_identifier_mapping_build_request_msg ()

    lasso_error_t
    lasso_name_identifier_mapping_build_request_msg
                                   (LassoNameIdentifierMapping *mapping);

Builds a name identifier mapping request message.

- If it is a SOAP method, then it builds the request as a SOAP message, optionally signs his node, sets `msg_body` with that message and sets `msg_url` with the SOAP Endpoint URL

- If it is a HTTP-Redirect method, then it builds the request as a query string message, optionally signs it and sets `msg_url` to that URL.

#### Parameters

mapping | a LassoNameIdentifierMapping |

#### Returns

0 on success; or a negative value otherwise.

### lasso_name_identifier_mapping_build_response_msg ()

    lasso_error_t
    lasso_name_identifier_mapping_build_response_msg
                                   (LassoNameIdentifierMapping *mapping);

Builds a name identifier mapping response message.

- If it is a SOAP method, then it builds the response as a SOAP message, optionally signs his node, sets `msg_body` with that message and sets `msg_url` with the register name identifier service return URL.

- If it is a HTTP-Redirect method, then it builds the response as a query string message, optionally signs it and sets `msg_url` to that URL.

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).

#### Parameters

mapping | a LassoNameIdentifierMapping |

#### Returns

0 on success; or a negative value otherwise.

### lasso_name_identifier_mapping_destroy ()

    void
    lasso_name_identifier_mapping_destroy (LassoNameIdentifierMapping *mapping);

Destroys a LassoNameIdentifierMapping object.

#### Parameters

mapping | a LassoNameIdentifierMapping |

### lasso_name_identifier_mapping_init_request ()

    lasso_error_t
    lasso_name_identifier_mapping_init_request
                                   (LassoNameIdentifierMapping *mapping,
                                    gchar *targetNamespace,
                                    gchar *remote_providerID);

Initializes a new lib:NameIdentifierMappingRequest request.

#### Parameters

mapping | a LassoNameIdentifierMapping |
targetNamespace | the request targetNamespace |
remote_providerID | the providerID of the identity provider. |

#### Returns

0 on success; or a negative value otherwise.

### lasso_name_identifier_mapping_process_request_msg ()

    lasso_error_t
    lasso_name_identifier_mapping_process_request_msg
                                   (LassoNameIdentifierMapping *mapping,
                                    gchar *request_msg);

Processes a lib:NameIdentifierMappingRequest message. Rebuilds a request object from the message and optionally verifies its signature.

#### Parameters

mapping | a LassoNameIdentifierMapping |
request_msg | the name identifier mapping request message |

#### Returns

0 on success; or a negative value otherwise.

### lasso_name_identifier_mapping_process_response_msg ()

    lasso_error_t
    lasso_name_identifier_mapping_process_response_msg
                                   (LassoNameIdentifierMapping *mapping,
                                    gchar *response_msg);

Processes a lib:NameIdentifierMappingResponse message. Rebuilds a response object from the message and optionally verifies its signature.

If the response depicts Success it will also sets `targetNameIdentifier` .

#### Parameters

mapping | a LassoNameIdentifierMapping |
response_msg | the name identifier mapping response message |

#### Returns

0 on success; or a negative value otherwise.

### lasso_name_identifier_mapping_validate_request ()

    lasso_error_t
    lasso_name_identifier_mapping_validate_request
                                   (LassoNameIdentifierMapping *mapping);

Checks profile request with regards to message status and principal federations, update them accordingly and prepares a lib:NameIdentifierMappingResponse accordingly.

#### Parameters

mapping | a LassoNameIdentifierMapping |

#### Returns

0 on success; or a negative value otherwise.

## Types and Values

### struct LassoNameIdentifierMapping

    struct LassoNameIdentifierMapping {
    	gchar *targetNameIdentifier;
    };