Blob Blame History Raw
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>LassoServer: Lasso Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="Lasso Reference Manual">
<link rel="up" href="architecture.html" title="Lasso Architecture">
<link rel="prev" href="architecture.html" title="Lasso Architecture">
<link rel="next" href="lasso-LassoProvider.html" title="LassoProvider">
<meta name="generator" content="GTK-Doc V1.28 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#lasso-LassoServer.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="architecture.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="architecture.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="lasso-LassoProvider.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="lasso-LassoServer"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="lasso-LassoServer.top_of_page"></a>LassoServer</span></h2>
<p>LassoServer — Representation of the current server</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="lasso-LassoServer.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="lasso-LassoServer.html#LassoServer" title="struct LassoServer"><span class="returnvalue">LassoServer</span></a> *
</td>
<td class="function_name">
<a class="link" href="lasso-LassoServer.html#lasso-server-new" title="lasso_server_new ()">lasso_server_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="lasso-LassoServer.html#LassoServer" title="struct LassoServer"><span class="returnvalue">LassoServer</span></a> *
</td>
<td class="function_name">
<a class="link" href="lasso-LassoServer.html#lasso-server-new-from-buffers" title="lasso_server_new_from_buffers ()">lasso_server_new_from_buffers</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="lasso-LassoServer.html#LassoServer" title="struct LassoServer"><span class="returnvalue">LassoServer</span></a> *
</td>
<td class="function_name">
<a class="link" href="lasso-LassoServer.html#lasso-server-new-from-dump" title="lasso_server_new_from_dump ()">lasso_server_new_from_dump</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">lasso_error_t</span>
</td>
<td class="function_name">
<a class="link" href="lasso-LassoServer.html#lasso-server-add-provider" title="lasso_server_add_provider ()">lasso_server_add_provider</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">lasso_error_t</span>
</td>
<td class="function_name">
<a class="link" href="lasso-LassoServer.html#lasso-server-add-provider2" title="lasso_server_add_provider2 ()">lasso_server_add_provider2</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">lasso_error_t</span>
</td>
<td class="function_name">
<a class="link" href="lasso-LassoServer.html#lasso-server-add-provider-from-buffer" title="lasso_server_add_provider_from_buffer ()">lasso_server_add_provider_from_buffer</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">lasso_error_t</span>
</td>
<td class="function_name">
<a class="link" href="lasso-LassoServer.html#lasso-server-load-metadata" title="lasso_server_load_metadata ()">lasso_server_load_metadata</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="lasso-LassoServer.html#lasso-server-destroy" title="lasso_server_destroy ()">lasso_server_destroy</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="lasso-LassoServer.html#lasso-server-dump" title="lasso_server_dump ()">lasso_server_dump</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="lasso-LassoProvider.html#LassoProvider" title="struct LassoProvider"><span class="returnvalue">LassoProvider</span></a> *
</td>
<td class="function_name">
<a class="link" href="lasso-LassoServer.html#lasso-server-get-provider" title="lasso_server_get_provider ()">lasso_server_get_provider</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">lasso_error_t</span>
</td>
<td class="function_name">
<a class="link" href="lasso-LassoServer.html#lasso-server-set-encryption-private-key" title="lasso_server_set_encryption_private_key ()">lasso_server_set_encryption_private_key</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">lasso_error_t</span>
</td>
<td class="function_name">
<a class="link" href="lasso-LassoServer.html#lasso-server-set-encryption-private-key-with-password" title="lasso_server_set_encryption_private_key_with_password ()">lasso_server_set_encryption_private_key_with_password</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">lasso_error_t</span>
</td>
<td class="function_name">
<a class="link" href="lasso-LassoServer.html#lasso-server-load-affiliation" title="lasso_server_load_affiliation ()">lasso_server_load_affiliation</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="lasso-LassoServer.html#lasso-server-get-endpoint-url-by-id" title="lasso_server_get_endpoint_url_by_id ()">lasso_server_get_endpoint_url_by_id</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GList</span> *
</td>
<td class="function_name">
<a class="link" href="lasso-LassoServer.html#lasso-server-get-filtered-provider-list" title="lasso_server_get_filtered_provider_list ()">lasso_server_get_filtered_provider_list</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">lasso_error_t</span>
</td>
<td class="function_name">
<a class="link" href="lasso-LassoServer.html#lasso-server-saml2-assertion-setup-signature" title="lasso_server_saml2_assertion_setup_signature ()">lasso_server_saml2_assertion_setup_signature</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="lasso-LassoServer.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody><tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="lasso-LassoServer.html#LassoServer" title="struct LassoServer">LassoServer</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="lasso-LassoServer.description"></a><h2>Description</h2>
<p>It holds the data about a provider, other providers it knows, which
certificates to use, etc.</p>
</div>
<div class="refsect1">
<a name="lasso-LassoServer.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="lasso-server-new"></a><h3>lasso_server_new ()</h3>
<pre class="programlisting"><a class="link" href="lasso-LassoServer.html#LassoServer" title="struct LassoServer"><span class="returnvalue">LassoServer</span></a> *
lasso_server_new (<em class="parameter"><code>const <span class="type">gchar</span> *metadata</code></em>,
                  <em class="parameter"><code>const <span class="type">gchar</span> *private_key</code></em>,
                  <em class="parameter"><code>const <span class="type">gchar</span> *private_key_password</code></em>,
                  <em class="parameter"><code>const <span class="type">gchar</span> *certificate</code></em>);</pre>
<p>Creates a new <a class="link" href="lasso-LassoServer.html#LassoServer" title="struct LassoServer"><span class="type">LassoServer</span></a>.</p>
<div class="refsect3">
<a name="lasso-server-new.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>metadata</p></td>
<td class="parameter_description"><p>path to the provider metadata file or NULL, for a LECP server</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>private_key</p></td>
<td class="parameter_description"><p>path to the the server private key file or NULL. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>private_key_password</p></td>
<td class="parameter_description"><p>password to private key if it is encrypted, or NULL. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>certificate</p></td>
<td class="parameter_description"><p>path to the server certificate file, or NULL. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="lasso-server-new.returns"></a><h4>Returns</h4>
<p> a newly created <a class="link" href="lasso-LassoServer.html#LassoServer" title="struct LassoServer"><span class="type">LassoServer</span></a> object; or NULL if an error
occured</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="lasso-server-new-from-buffers"></a><h3>lasso_server_new_from_buffers ()</h3>
<pre class="programlisting"><a class="link" href="lasso-LassoServer.html#LassoServer" title="struct LassoServer"><span class="returnvalue">LassoServer</span></a> *
lasso_server_new_from_buffers (<em class="parameter"><code>const <span class="type">gchar</span> *metadata</code></em>,
                               <em class="parameter"><code>const <span class="type">gchar</span> *private_key_content</code></em>,
                               <em class="parameter"><code>const <span class="type">gchar</span> *private_key_password</code></em>,
                               <em class="parameter"><code>const <span class="type">gchar</span> *certificate_content</code></em>);</pre>
<p>Creates a new <a class="link" href="lasso-LassoServer.html#LassoServer" title="struct LassoServer"><span class="type">LassoServer</span></a>.</p>
<div class="refsect3">
<a name="lasso-server-new-from-buffers.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>metadata</p></td>
<td class="parameter_description"><p>NULL terminated string containing the content of an ID-FF 1.2 metadata file</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>private_key_content</p></td>
<td class="parameter_description"><p>NULL terminated string containing a PEM formatted private key. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>private_key_password</p></td>
<td class="parameter_description"><p>a NULL terminated string which is the optional password of
the private key. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>certificate_content</p></td>
<td class="parameter_description"><p>NULL terminated string containing a PEM formatted X509
certificate. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="lasso-server-new-from-buffers.returns"></a><h4>Returns</h4>
<p> a newly created <a class="link" href="lasso-LassoServer.html#LassoServer" title="struct LassoServer"><span class="type">LassoServer</span></a> object; or NULL if an error occured</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="lasso-server-new-from-dump"></a><h3>lasso_server_new_from_dump ()</h3>
<pre class="programlisting"><a class="link" href="lasso-LassoServer.html#LassoServer" title="struct LassoServer"><span class="returnvalue">LassoServer</span></a> *
lasso_server_new_from_dump (<em class="parameter"><code>const <span class="type">gchar</span> *dump</code></em>);</pre>
<p>Restores the <em class="parameter"><code>dump</code></em>
 to a new <a class="link" href="lasso-LassoServer.html#LassoServer" title="struct LassoServer"><span class="type">LassoServer</span></a>.</p>
<div class="refsect3">
<a name="lasso-server-new-from-dump.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>dump</p></td>
<td class="parameter_description"><p>XML server dump</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="lasso-server-new-from-dump.returns"></a><h4>Returns</h4>
<p> a newly created <a class="link" href="lasso-LassoServer.html#LassoServer" title="struct LassoServer"><span class="type">LassoServer</span></a>; or NULL if an error occured</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="lasso-server-add-provider"></a><h3>lasso_server_add_provider ()</h3>
<pre class="programlisting"><span class="returnvalue">lasso_error_t</span>
lasso_server_add_provider (<em class="parameter"><code><a class="link" href="lasso-LassoServer.html#LassoServer" title="struct LassoServer"><span class="type">LassoServer</span></a> *server</code></em>,
                           <em class="parameter"><code><a class="link" href="lasso-LassoProvider.html#LassoProviderRole" title="enum LassoProviderRole"><span class="type">LassoProviderRole</span></a> role</code></em>,
                           <em class="parameter"><code>const <span class="type">gchar</span> *metadata</code></em>,
                           <em class="parameter"><code>const <span class="type">gchar</span> *public_key</code></em>,
                           <em class="parameter"><code>const <span class="type">gchar</span> *ca_cert_chain</code></em>);</pre>
<p>Creates a new <a class="link" href="lasso-LassoProvider.html#LassoProvider" title="struct LassoProvider"><span class="type">LassoProvider</span></a> and makes it known to the <em class="parameter"><code>server</code></em>
</p>
<div class="refsect3">
<a name="lasso-server-add-provider.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>server</p></td>
<td class="parameter_description"><p>a <a class="link" href="lasso-LassoServer.html#LassoServer" title="struct LassoServer"><span class="type">LassoServer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>role</p></td>
<td class="parameter_description"><p>provider role, identity provider or service provider</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>metadata</p></td>
<td class="parameter_description"><p>path to the provider metadata file</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>public_key</p></td>
<td class="parameter_description"><p>provider public key file (may be a certificate) or NULL. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>ca_cert_chain</p></td>
<td class="parameter_description"><p>provider CA certificate chain file or NULL. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="lasso-server-add-provider.returns"></a><h4>Returns</h4>
<p> 0 on success; a negative value if an error occured.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="lasso-server-add-provider2"></a><h3>lasso_server_add_provider2 ()</h3>
<pre class="programlisting"><span class="returnvalue">lasso_error_t</span>
lasso_server_add_provider2 (<em class="parameter"><code><a class="link" href="lasso-LassoServer.html#LassoServer" title="struct LassoServer"><span class="type">LassoServer</span></a> *server</code></em>,
                            <em class="parameter"><code><a class="link" href="lasso-LassoProvider.html#LassoProvider" title="struct LassoProvider"><span class="type">LassoProvider</span></a> *provider</code></em>);</pre>
<p>Add <em class="parameter"><code>provider</code></em>
 to the list of known providers object of <em class="parameter"><code>server</code></em>
.</p>
<p>Return 0 if successful, LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ otherwise.</p>
<div class="refsect3">
<a name="lasso-server-add-provider2.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>server</p></td>
<td class="parameter_description"><p>a <a class="link" href="lasso-LassoServer.html#LassoServer" title="struct LassoServer"><span class="type">LassoServer</span></a> object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>provider</p></td>
<td class="parameter_description"><p>a <a class="link" href="lasso-LassoProvider.html#LassoProvider" title="struct LassoProvider"><span class="type">LassoProvider</span></a> object</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="lasso-server-add-provider-from-buffer"></a><h3>lasso_server_add_provider_from_buffer ()</h3>
<pre class="programlisting"><span class="returnvalue">lasso_error_t</span>
lasso_server_add_provider_from_buffer (<em class="parameter"><code><a class="link" href="lasso-LassoServer.html#LassoServer" title="struct LassoServer"><span class="type">LassoServer</span></a> *server</code></em>,
                                       <em class="parameter"><code><a class="link" href="lasso-LassoProvider.html#LassoProviderRole" title="enum LassoProviderRole"><span class="type">LassoProviderRole</span></a> role</code></em>,
                                       <em class="parameter"><code>const <span class="type">gchar</span> *metadata</code></em>,
                                       <em class="parameter"><code>const <span class="type">gchar</span> *public_key</code></em>,
                                       <em class="parameter"><code>const <span class="type">gchar</span> *ca_cert_chain</code></em>);</pre>
<p>Creates a new <a class="link" href="lasso-LassoProvider.html#LassoProvider" title="struct LassoProvider"><span class="type">LassoProvider</span></a> and makes it known to the <em class="parameter"><code>server</code></em>
</p>
<div class="refsect3">
<a name="lasso-server-add-provider-from-buffer.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>server</p></td>
<td class="parameter_description"><p>a <a class="link" href="lasso-LassoServer.html#LassoServer" title="struct LassoServer"><span class="type">LassoServer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>role</p></td>
<td class="parameter_description"><p>provider role, identity provider or service provider</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>metadata</p></td>
<td class="parameter_description"><p>a string buffer containg the metadata file for a new provider</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>public_key</p></td>
<td class="parameter_description"><p>provider public key file (may be a certificate) or NULL. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>ca_cert_chain</p></td>
<td class="parameter_description"><p>provider CA certificate chain file or NULL. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="lasso-server-add-provider-from-buffer.returns"></a><h4>Returns</h4>
<p> 0 on success; a negative value if an error occured.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="lasso-server-load-metadata"></a><h3>lasso_server_load_metadata ()</h3>
<pre class="programlisting"><span class="returnvalue">lasso_error_t</span>
lasso_server_load_metadata (<em class="parameter"><code><a class="link" href="lasso-LassoServer.html#LassoServer" title="struct LassoServer"><span class="type">LassoServer</span></a> *server</code></em>,
                            <em class="parameter"><code><a class="link" href="lasso-LassoProvider.html#LassoProviderRole" title="enum LassoProviderRole"><span class="type">LassoProviderRole</span></a> role</code></em>,
                            <em class="parameter"><code>const <span class="type">gchar</span> *federation_file</code></em>,
                            <em class="parameter"><code>const <span class="type">gchar</span> *trusted_roots</code></em>,
                            <em class="parameter"><code><span class="type">GList</span> *blacklisted_entity_ids</code></em>,
                            <em class="parameter"><code><span class="type">GList</span> **loaded_entity_ids</code></em>,
                            <em class="parameter"><code><span class="type">LassoServerLoadMetadataFlag</span> flags</code></em>);</pre>
<p>Load all the SAML 2.0 entities from <em class="parameter"><code>federation_file</code></em>
 which contains a declaration for <em class="parameter"><code>role</code></em>
. If
<em class="parameter"><code>trusted_roots</code></em>
 is non-NULL, use it to check a signature on the metadata file, otherwise ignore
signature validation.</p>
<div class="refsect3">
<a name="lasso-server-load-metadata.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>server</p></td>
<td class="parameter_description"><p>a <a class="link" href="lasso-LassoServer.html#LassoServer" title="struct LassoServer"><span class="type">LassoServer</span></a> object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>role</p></td>
<td class="parameter_description"><p>a <a class="link" href="lasso-LassoProvider.html#LassoProviderRole" title="enum LassoProviderRole"><span class="type">LassoProviderRole</span></a> value</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>federation_file</p></td>
<td class="parameter_description"><p>path to a SAML 2.0 metadata file</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>trusted_roots</p></td>
<td class="parameter_description"><p>a PEM encoded files containing the certificates to check signatures
on the metadata file (optional). </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>blacklisted_entity_ids</p></td>
<td class="parameter_description"><p>a list of EntityID which should not be
loaded, can be NULL. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> string]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>loaded_entity_ids</p></td>
<td class="parameter_description"><p>an output parameter for the
list of the loaded EntityID, can be NULL. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> string][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>flags modifying the behaviour for checking signatures on EntityDescriptor and
EntitiesDescriptors nodes.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="lasso-server-load-metadata.returns"></a><h4>Returns</h4>
<p> 0 on success, an error code otherwise, among:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>
LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ if server is not a <a class="link" href="lasso-LassoServer.html#LassoServer" title="struct LassoServer"><span class="type">LassoServer</span></a> object or <em class="parameter"><code>role</code></em> is not a
valid role value,
</p></li>
<li class="listitem"><p>
LASSO_DS_ERROR_CA_CERT_CHAIN_LOAD_FAILED if the <em class="parameter"><code>trusted_root</code></em> file cannot be loaded,
</p></li>
</ul></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="lasso-server-destroy"></a><h3>lasso_server_destroy ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
lasso_server_destroy (<em class="parameter"><code><a class="link" href="lasso-LassoServer.html#LassoServer" title="struct LassoServer"><span class="type">LassoServer</span></a> *server</code></em>);</pre>
<p>Destroys a server.</p>
<div class="refsect3">
<a name="lasso-server-destroy.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>server</p></td>
<td class="parameter_description"><p>a <a class="link" href="lasso-LassoServer.html#LassoServer" title="struct LassoServer"><span class="type">LassoServer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="lasso-server-dump"></a><h3>lasso_server_dump ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> *
lasso_server_dump (<em class="parameter"><code><a class="link" href="lasso-LassoServer.html#LassoServer" title="struct LassoServer"><span class="type">LassoServer</span></a> *server</code></em>);</pre>
<p>Dumps <em class="parameter"><code>server</code></em>
 content to an XML string.</p>
<div class="refsect3">
<a name="lasso-server-dump.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>server</p></td>
<td class="parameter_description"><p>a <a class="link" href="lasso-LassoServer.html#LassoServer" title="struct LassoServer"><span class="type">LassoServer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="lasso-server-dump.returns"></a><h4>Returns</h4>
<p>the dump string.  It must be freed by the caller. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="lasso-server-get-provider"></a><h3>lasso_server_get_provider ()</h3>
<pre class="programlisting"><a class="link" href="lasso-LassoProvider.html#LassoProvider" title="struct LassoProvider"><span class="returnvalue">LassoProvider</span></a> *
lasso_server_get_provider (<em class="parameter"><code>const <a class="link" href="lasso-LassoServer.html#LassoServer" title="struct LassoServer"><span class="type">LassoServer</span></a> *server</code></em>,
                           <em class="parameter"><code>const <span class="type">gchar</span> *providerID</code></em>);</pre>
<p>Looks up for a <a class="link" href="lasso-LassoProvider.html#LassoProvider" title="struct LassoProvider"><span class="type">LassoProvider</span></a> whose ID is <em class="parameter"><code>providerID</code></em>
 and returns it.</p>
<div class="refsect3">
<a name="lasso-server-get-provider.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>server</p></td>
<td class="parameter_description"><p>a <a class="link" href="lasso-LassoServer.html#LassoServer" title="struct LassoServer"><span class="type">LassoServer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>providerID</p></td>
<td class="parameter_description"><p>the provider ID</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="lasso-server-get-provider.returns"></a><h4>Returns</h4>
<p>the <a class="link" href="lasso-LassoProvider.html#LassoProvider" title="struct LassoProvider"><span class="type">LassoProvider</span></a>, NULL if it was not found.  The
<a class="link" href="lasso-LassoProvider.html#LassoProvider" title="struct LassoProvider"><span class="type">LassoProvider</span></a> is owned by Lasso and should not be freed. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="lasso-server-set-encryption-private-key"></a><h3>lasso_server_set_encryption_private_key ()</h3>
<pre class="programlisting"><span class="returnvalue">lasso_error_t</span>
lasso_server_set_encryption_private_key
                               (<em class="parameter"><code><a class="link" href="lasso-LassoServer.html#LassoServer" title="struct LassoServer"><span class="type">LassoServer</span></a> *server</code></em>,
                                <em class="parameter"><code>const <span class="type">gchar</span> *filename_or_buffer</code></em>);</pre>
<div class="warning">
<p><code class="literal">lasso_server_set_encryption_private_key</code> has been deprecated since version 2.3 and should not be used in newly-written code.</p>
<p>Use <a class="link" href="lasso-LassoServer.html#lasso-server-set-encryption-private-key-with-password" title="lasso_server_set_encryption_private_key_with_password ()"><code class="function">lasso_server_set_encryption_private_key_with_password()</code></a> instead.</p>
</div>
<p>Load an encryption private key from a file and set it in the server object</p>
<p>If <em class="parameter"><code>filename_or_buffer</code></em>
 is NULL, it frees the currently setted key.</p>
<div class="refsect3">
<a name="lasso-server-set-encryption-private-key.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>server</p></td>
<td class="parameter_description"><p>a <a class="link" href="lasso-LassoServer.html#LassoServer" title="struct LassoServer"><span class="type">LassoServer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>filename_or_buffer</p></td>
<td class="parameter_description"><p>file name of the encryption key to load or its content as a
NULL-terminated string. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="lasso-server-set-encryption-private-key.returns"></a><h4>Returns</h4>
<p> 0 on success; another value if an error occured.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="lasso-server-set-encryption-private-key-with-password"></a><h3>lasso_server_set_encryption_private_key_with_password ()</h3>
<pre class="programlisting"><span class="returnvalue">lasso_error_t</span>
lasso_server_set_encryption_private_key_with_password
                               (<em class="parameter"><code><a class="link" href="lasso-LassoServer.html#LassoServer" title="struct LassoServer"><span class="type">LassoServer</span></a> *server</code></em>,
                                <em class="parameter"><code>const <span class="type">gchar</span> *filename_or_buffer</code></em>,
                                <em class="parameter"><code>const <span class="type">gchar</span> *password</code></em>);</pre>
<p>Load an encryption private key from a file and set it in the server object. If <em class="parameter"><code>password</code></em>
 is
non-NULL try to decrypt the key with it.</p>
<p>If <em class="parameter"><code>filename_or_buffer</code></em>
 is NULL, it frees the currently setted key.</p>
<div class="refsect3">
<a name="lasso-server-set-encryption-private-key-with-password.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>server</p></td>
<td class="parameter_description"><p>a <a class="link" href="lasso-LassoServer.html#LassoServer" title="struct LassoServer"><span class="type">LassoServer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>filename_or_buffer</p></td>
<td class="parameter_description"><p>file name of the encryption key to load or its content as a
NULL-terminated string. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>password</p></td>
<td class="parameter_description"><p>an optional password to decrypt the encryption key. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="lasso-server-set-encryption-private-key-with-password.returns"></a><h4>Returns</h4>
<p> 0 on success; another value if an error occured.</p>
</div>
<p class="since">Since: 2.3</p>
</div>
<hr>
<div class="refsect2">
<a name="lasso-server-load-affiliation"></a><h3>lasso_server_load_affiliation ()</h3>
<pre class="programlisting"><span class="returnvalue">lasso_error_t</span>
lasso_server_load_affiliation (<em class="parameter"><code><a class="link" href="lasso-LassoServer.html#LassoServer" title="struct LassoServer"><span class="type">LassoServer</span></a> *server</code></em>,
                               <em class="parameter"><code>const <span class="type">gchar</span> *filename</code></em>);</pre>
<p>Load an affiliation metadata file into <em class="parameter"><code>server</code></em>
; this must be called after
providers have been added to <em class="parameter"><code>server</code></em>
.</p>
<div class="refsect3">
<a name="lasso-server-load-affiliation.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>server</p></td>
<td class="parameter_description"><p>a <a class="link" href="lasso-LassoServer.html#LassoServer" title="struct LassoServer"><span class="type">LassoServer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>filename</p></td>
<td class="parameter_description"><p>file name of the affiliation metadata to load</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="lasso-server-load-affiliation.returns"></a><h4>Returns</h4>
<p> 0 on success; another value if an error occured.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="lasso-server-get-endpoint-url-by-id"></a><h3>lasso_server_get_endpoint_url_by_id ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> *
lasso_server_get_endpoint_url_by_id (<em class="parameter"><code>const <a class="link" href="lasso-LassoServer.html#LassoServer" title="struct LassoServer"><span class="type">LassoServer</span></a> *server</code></em>,
                                     <em class="parameter"><code>const <span class="type">gchar</span> *provider_id</code></em>,
                                     <em class="parameter"><code>const <span class="type">gchar</span> *endpoint_description</code></em>);</pre>
<p>Locate the provider in the server's list of providers, then select an
endpoint given the <em class="parameter"><code>endpoint_description</code></em>
 and return than endpoint's URL.
If the provider cannot be found or if the provider does not have a
matching endpoint NULL will be returned.</p>
<div class="refsect3">
<a name="lasso-server-get-endpoint-url-by-id.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>server</p></td>
<td class="parameter_description"><p>a <a class="link" href="lasso-LassoServer.html#LassoServer" title="struct LassoServer"><span class="type">LassoServer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>provider_id</p></td>
<td class="parameter_description"><p>the EntityID whose endpoints will be examined.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>endpoint_description</p></td>
<td class="parameter_description"><p>string describing criteria used to select endpoint.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="lasso-server-get-endpoint-url-by-id.returns"></a><h4>Returns</h4>
<p> url (must be freed by caller)</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="lasso-server-get-filtered-provider-list"></a><h3>lasso_server_get_filtered_provider_list ()</h3>
<pre class="programlisting"><span class="returnvalue">GList</span> *
lasso_server_get_filtered_provider_list
                               (<em class="parameter"><code>const <a class="link" href="lasso-LassoServer.html#LassoServer" title="struct LassoServer"><span class="type">LassoServer</span></a> *server</code></em>,
                                <em class="parameter"><code><a class="link" href="lasso-LassoProvider.html#LassoProviderRole" title="enum LassoProviderRole"><span class="type">LassoProviderRole</span></a> role</code></em>,
                                <em class="parameter"><code><a class="link" href="lasso-LassoProvider.html#LassoMdProtocolType" title="enum LassoMdProtocolType"><span class="type">LassoMdProtocolType</span></a> protocol_type</code></em>,
                                <em class="parameter"><code><a class="link" href="lasso-LassoProvider.html#LassoHttpMethod" title="enum LassoHttpMethod"><span class="type">LassoHttpMethod</span></a> http_method</code></em>);</pre>
<p>Iterate over the <em class="parameter"><code>server</code></em>
 providers and build a list of provider EntityID's who
have the specified <em class="parameter"><code>role</code></em>
 and at least one endpoint matching the
<em class="parameter"><code>protocol_type</code></em>
 and <em class="parameter"><code>http_method</code></em>
. Return a <span class="type">GList</span> list of EntityID's at the
<em class="parameter"><code>provider_list</code></em>
 pointer. The caller is responsible for freeing the <em class="parameter"><code>provider_list</code></em>

by calling <code class="function">lasso_release_list_of_strings()</code>.</p>
<div class="refsect3">
<a name="lasso-server-get-filtered-provider-list.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>server</p></td>
<td class="parameter_description"><p>a <a class="link" href="lasso-LassoServer.html#LassoServer" title="struct LassoServer"><span class="type">LassoServer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>role</p></td>
<td class="parameter_description"><p>each returned provider will match this <a class="link" href="lasso-LassoProvider.html#LassoProviderRole" title="enum LassoProviderRole"><span class="type">LassoProviderRole</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>protocol_type</p></td>
<td class="parameter_description"><p>provider must have endpoint matching <a class="link" href="lasso-LassoProvider.html#LassoMdProtocolType" title="enum LassoMdProtocolType"><span class="type">LassoMdProtocolType</span></a> and <em class="parameter"><code>http_method</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>http_method</p></td>
<td class="parameter_description"><p>provider must have endpoint matching <a class="link" href="lasso-LassoProvider.html#LassoHttpMethod" title="enum LassoHttpMethod"><span class="type">LassoHttpMethod</span></a> and <em class="parameter"><code>protocol_type</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="lasso-server-get-filtered-provider-list.returns"></a><h4>Returns</h4>
<p><span class="type">GList</span> of matching provider EntityID's returned here. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> string]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="lasso-server-saml2-assertion-setup-signature"></a><h3>lasso_server_saml2_assertion_setup_signature ()</h3>
<pre class="programlisting"><span class="returnvalue">lasso_error_t</span>
lasso_server_saml2_assertion_setup_signature
                               (<em class="parameter"><code><a class="link" href="lasso-LassoServer.html#LassoServer" title="struct LassoServer"><span class="type">LassoServer</span></a> *server</code></em>,
                                <em class="parameter"><code><a class="link" href="lasso-LassoSaml2Assertion.html#LassoSaml2Assertion" title="struct LassoSaml2Assertion"><span class="type">LassoSaml2Assertion</span></a> *saml2_assertion</code></em>);</pre>
<p>Configure signature on a saml2:Assertion element.</p>
<div class="refsect3">
<a name="lasso-server-saml2-assertion-setup-signature.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>server</p></td>
<td class="parameter_description"><p>a <a class="link" href="lasso-LassoServer.html#LassoServer" title="struct LassoServer"><span class="type">LassoServer</span></a> object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>saml2_assertion</p></td>
<td class="parameter_description"><p>a <a class="link" href="lasso-LassoSaml2Assertion.html#LassoSaml2Assertion" title="struct LassoSaml2Assertion"><span class="type">LassoSaml2Assertion</span></a> object</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="lasso-server-saml2-assertion-setup-signature.returns"></a><h4>Returns</h4>
<p> 0 if successfull, an error code otherwise.</p>
</div>
</div>
</div>
<div class="refsect1">
<a name="lasso-LassoServer.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="LassoServer"></a><h3>struct LassoServer</h3>
<pre class="programlisting">struct LassoServer {
	LassoProvider parent;

	GHashTable *providers; /* of LassoProvider */
	/* Can actually contain LassoDataService or LassoIdWsf2DataService or any subclass */

	gchar *private_key;
	gchar *private_key_password;
	gchar *certificate;
	LassoSignatureMethod signature_method;
};
</pre>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.28</div>
</body>
</html>