## LassoSaml2NameID

LassoSaml2NameID — <saml2:NameID>

## Functions

LassoNode * | lasso_saml2_name_id_new ()
LassoNode * | lasso_saml2_name_id_new_with_string ()
LassoSaml2NameID * | lasso_saml2_name_id_build_persistent ()
gboolean | lasso_saml2_name_id_equals ()
LassoSaml2NameID * | lasso_saml2_name_id_new_with_persistent_format ()

## Types and Values

struct | LassoSaml2NameID

## Description

Figure 60. Schema fragment for saml2:NameID

    <complexType name="NameIDType">
      <simpleContent>
        <extension base="string">
          <attributeGroup ref="saml:IDNameQualifiers"/>
          <attribute name="Format" type="anyURI" use="optional"/>
          <attribute name="SPProvidedID" type="string" use="optional"/>
        </extension>
      </simpleContent>
    </complexType>

## Functions

### lasso_saml2_name_id_new ()

    LassoNode *
    lasso_saml2_name_id_new (void);

Creates a new LassoSaml2NameID object.

#### Returns

a newly created LassoSaml2NameID object

### lasso_saml2_name_id_new_with_string ()

    LassoNode *
    lasso_saml2_name_id_new_with_string (char *content);

Creates a new LassoSaml2NameID object and initializes it with `content` . Beware that no format is set.

#### Parameters

content | the Name Identifier. |

#### Returns

a newly created LassoSaml2NameID object

### lasso_saml2_name_id_build_persistent ()

    LassoSaml2NameID *
    lasso_saml2_name_id_build_persistent (const char *id,
                                          const char *idpID,
                                          const char *providerID);

`lasso_saml2_name_id_build_persistent` has been deprecated since version 2.3 and should not be used in newly-written code.

use `lasso_saml2_name_id_new_with_persistent_format()` instead.

Create a new LassoSaml2NameID object, which the LASSO_SAML2_NAME_IDENTIFIER_FORMAT_PERSISTENT format, `id` as content, `idpID` as NameQualifier and `providerID` as SPNameQualifier.

#### Parameters

id | the identifier for the princiapl |
idpID | the entity ID of the IdP |
providerID | the entity ID of the provider |

#### Returns

a newly created LassoSaml2NameID

### lasso_saml2_name_id_equals ()

    gboolean
    lasso_saml2_name_id_equals (LassoSaml2NameID *name_id,
                                LassoSaml2NameID *other_name_id);

Return TRUE if `name_id` equals `other_name_id` .

#### Parameters

name_id | a LassoSaml2NameID object |
other_name_id | another LassoSaml2NameID object |

#### Returns

TRUE if the two NameID are equal and are LassoSaml2NameID objects, FALSE otherwise.

### lasso_saml2_name_id_new_with_persistent_format ()

    LassoSaml2NameID *
    lasso_saml2_name_id_new_with_persistent_format
                                   (const char *id,
                                    const char *idpID,
                                    const char *providerID);

Create a new LassoSaml2NameID object, which the LASSO_SAML2_NAME_IDENTIFIER_FORMAT_PERSISTENT format, `id` as content, `idpID` as NameQualifier and `providerID` as SPNameQualifier.

#### Parameters

id | the identifier for the princiapl |
idpID | the entity ID of the IdP |
providerID | the entity ID of the provider |

#### Returns

a newly created LassoSaml2NameID

Since: 2.3

## Types and Values

### struct LassoSaml2NameID

    struct LassoSaml2NameID {
    	LassoNode parent;

    	/* elements */
    	char *content;
    	/* attributes */
    	char *Format;
    	char *SPProvidedID;
    	char *NameQualifier;
    	char *SPNameQualifier;
    };