blob: 2738233b3a56824e8a25778a0eac34f604be7242 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.20"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Qpid Proton C API: SASL</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function() { init_search(); });
/* @license-end */
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Qpid Proton C API
&#160;<span id="projectnumber">0.32.0</span>
</div>
</td>
<td> <div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.svg"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.20 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('group__sasl.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">SASL<div class="ingroups"><a class="el" href="group__core.html">Core</a></div></div> </div>
</div><!--header-->
<div class="contents">
<p>SASL secure transport layer.
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga4d21fddba80d3f88d0529aafe12328b0"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group__sasl.html#ga4d21fddba80d3f88d0529aafe12328b0">pn_sasl_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sasl.html#ga4d21fddba80d3f88d0529aafe12328b0">pn_sasl_t</a></td></tr>
<tr class="memdesc:ga4d21fddba80d3f88d0529aafe12328b0"><td class="mdescLeft">&#160;</td><td class="mdescRight">The SASL layer is responsible for establishing an authenticated and/or encrypted tunnel over which AMQP frames are passed between peers. <a href="group__sasl.html#ga4d21fddba80d3f88d0529aafe12328b0">More...</a><br /></td></tr>
<tr class="separator:ga4d21fddba80d3f88d0529aafe12328b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:gad44e79f52e0669b1930689b56dfa9c3b"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sasl.html#gad44e79f52e0669b1930689b56dfa9c3b">pn_sasl_outcome_t</a> { <br />
&#160;&#160;<b>PN_SASL_NONE</b>,
<a class="el" href="group__sasl.html#ggad44e79f52e0669b1930689b56dfa9c3ba0050b91650a3826a090e13f57b3b941e">PN_SASL_OK</a>,
<a class="el" href="group__sasl.html#ggad44e79f52e0669b1930689b56dfa9c3bac63734ecde7c8170554f6bf04f6ce64a">PN_SASL_AUTH</a>,
<a class="el" href="group__sasl.html#ggad44e79f52e0669b1930689b56dfa9c3bacd46a2fda23f674c23ed81e6076c1939">PN_SASL_SYS</a>,
<br />
&#160;&#160;<a class="el" href="group__sasl.html#ggad44e79f52e0669b1930689b56dfa9c3ba03019f909ba1d98aae94437ca4bd0191">PN_SASL_PERM</a>,
<a class="el" href="group__sasl.html#ggad44e79f52e0669b1930689b56dfa9c3baee28d2c03fa80dccf771e37aae1bcdf3">PN_SASL_TEMP</a>
<br />
}</td></tr>
<tr class="memdesc:gad44e79f52e0669b1930689b56dfa9c3b"><td class="mdescLeft">&#160;</td><td class="mdescRight">The result of the SASL negotiation. <a href="group__sasl.html#gad44e79f52e0669b1930689b56dfa9c3b">More...</a><br /></td></tr>
<tr class="separator:gad44e79f52e0669b1930689b56dfa9c3b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga7968e80e2fe9360fc14cf865dd1ac21c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__sasl.html#ga4d21fddba80d3f88d0529aafe12328b0">pn_sasl_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sasl.html#ga7968e80e2fe9360fc14cf865dd1ac21c">pn_sasl</a> (<a class="el" href="group__transport.html#gac26eda05f649bbf0399f3d8d78d12fa8">pn_transport_t</a> *transport)</td></tr>
<tr class="memdesc:ga7968e80e2fe9360fc14cf865dd1ac21c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct an Authentication and Security Layer object. <a href="group__sasl.html#ga7968e80e2fe9360fc14cf865dd1ac21c">More...</a><br /></td></tr>
<tr class="separator:ga7968e80e2fe9360fc14cf865dd1ac21c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1737191972d5dded0993bf1431e71df0"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sasl.html#ga1737191972d5dded0993bf1431e71df0">pn_sasl_extended</a> (void)</td></tr>
<tr class="memdesc:ga1737191972d5dded0993bf1431e71df0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Do we support extended SASL negotiation. <a href="group__sasl.html#ga1737191972d5dded0993bf1431e71df0">More...</a><br /></td></tr>
<tr class="separator:ga1737191972d5dded0993bf1431e71df0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0199871440c4ff89a204cc1d8a09f283"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sasl.html#ga0199871440c4ff89a204cc1d8a09f283">pn_sasl_done</a> (<a class="el" href="group__sasl.html#ga4d21fddba80d3f88d0529aafe12328b0">pn_sasl_t</a> *sasl, <a class="el" href="group__sasl.html#gad44e79f52e0669b1930689b56dfa9c3b">pn_sasl_outcome_t</a> outcome)</td></tr>
<tr class="memdesc:ga0199871440c4ff89a204cc1d8a09f283"><td class="mdescLeft">&#160;</td><td class="mdescRight"><b>Deprecated</b> - Do not use. <a href="group__sasl.html#ga0199871440c4ff89a204cc1d8a09f283">More...</a><br /></td></tr>
<tr class="separator:ga0199871440c4ff89a204cc1d8a09f283"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga03b6daf742db6a07bd7d03cb197aedb6"><td class="memItemLeft" align="right" valign="top"><a id="ga03b6daf742db6a07bd7d03cb197aedb6"></a>
<a class="el" href="group__sasl.html#gad44e79f52e0669b1930689b56dfa9c3b">pn_sasl_outcome_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sasl.html#ga03b6daf742db6a07bd7d03cb197aedb6">pn_sasl_outcome</a> (<a class="el" href="group__sasl.html#ga4d21fddba80d3f88d0529aafe12328b0">pn_sasl_t</a> *sasl)</td></tr>
<tr class="memdesc:ga03b6daf742db6a07bd7d03cb197aedb6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve the outcome of SASL negotiation. <br /></td></tr>
<tr class="separator:ga03b6daf742db6a07bd7d03cb197aedb6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga700e1d505068f895383dd932af55987e"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sasl.html#ga700e1d505068f895383dd932af55987e">pn_sasl_get_user</a> (<a class="el" href="group__sasl.html#ga4d21fddba80d3f88d0529aafe12328b0">pn_sasl_t</a> *sasl)</td></tr>
<tr class="memdesc:ga700e1d505068f895383dd932af55987e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve the authenticated user. <a href="group__sasl.html#ga700e1d505068f895383dd932af55987e">More...</a><br /></td></tr>
<tr class="separator:ga700e1d505068f895383dd932af55987e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga895b6a957bf0c0204aaddb3ec5b9d863"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sasl.html#ga895b6a957bf0c0204aaddb3ec5b9d863">pn_sasl_get_mech</a> (<a class="el" href="group__sasl.html#ga4d21fddba80d3f88d0529aafe12328b0">pn_sasl_t</a> *sasl)</td></tr>
<tr class="memdesc:ga895b6a957bf0c0204aaddb3ec5b9d863"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the selected SASL mechanism. <a href="group__sasl.html#ga895b6a957bf0c0204aaddb3ec5b9d863">More...</a><br /></td></tr>
<tr class="separator:ga895b6a957bf0c0204aaddb3ec5b9d863"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga73299a6a22e141e7911a739590032625"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sasl.html#ga73299a6a22e141e7911a739590032625">pn_sasl_allowed_mechs</a> (<a class="el" href="group__sasl.html#ga4d21fddba80d3f88d0529aafe12328b0">pn_sasl_t</a> *sasl, const char *mechs)</td></tr>
<tr class="memdesc:ga73299a6a22e141e7911a739590032625"><td class="mdescLeft">&#160;</td><td class="mdescRight">SASL mechanisms that are to be considered for authentication. <a href="group__sasl.html#ga73299a6a22e141e7911a739590032625">More...</a><br /></td></tr>
<tr class="separator:ga73299a6a22e141e7911a739590032625"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf472325bc055bb18a5a6f5ca03eda315"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sasl.html#gaf472325bc055bb18a5a6f5ca03eda315">pn_sasl_set_allow_insecure_mechs</a> (<a class="el" href="group__sasl.html#ga4d21fddba80d3f88d0529aafe12328b0">pn_sasl_t</a> *sasl, bool insecure)</td></tr>
<tr class="memdesc:gaf472325bc055bb18a5a6f5ca03eda315"><td class="mdescLeft">&#160;</td><td class="mdescRight">Boolean to allow use of clear text authentication mechanisms. <a href="group__sasl.html#gaf472325bc055bb18a5a6f5ca03eda315">More...</a><br /></td></tr>
<tr class="separator:gaf472325bc055bb18a5a6f5ca03eda315"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac53ad15ee429b7ce9d0c598d1e347243"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sasl.html#gac53ad15ee429b7ce9d0c598d1e347243">pn_sasl_get_allow_insecure_mechs</a> (<a class="el" href="group__sasl.html#ga4d21fddba80d3f88d0529aafe12328b0">pn_sasl_t</a> *sasl)</td></tr>
<tr class="memdesc:gac53ad15ee429b7ce9d0c598d1e347243"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the current value for allow_insecure_mechs. <a href="group__sasl.html#gac53ad15ee429b7ce9d0c598d1e347243">More...</a><br /></td></tr>
<tr class="separator:gac53ad15ee429b7ce9d0c598d1e347243"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad1a6932135165f0e5b7639b79ac71c56"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sasl.html#gad1a6932135165f0e5b7639b79ac71c56">pn_sasl_config_name</a> (<a class="el" href="group__sasl.html#ga4d21fddba80d3f88d0529aafe12328b0">pn_sasl_t</a> *sasl, const char *name)</td></tr>
<tr class="memdesc:gad1a6932135165f0e5b7639b79ac71c56"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the sasl configuration name. <a href="group__sasl.html#gad1a6932135165f0e5b7639b79ac71c56">More...</a><br /></td></tr>
<tr class="separator:gad1a6932135165f0e5b7639b79ac71c56"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabf4176414424ce02a4e03b4338d30521"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sasl.html#gabf4176414424ce02a4e03b4338d30521">pn_sasl_config_path</a> (<a class="el" href="group__sasl.html#ga4d21fddba80d3f88d0529aafe12328b0">pn_sasl_t</a> *sasl, const char *path)</td></tr>
<tr class="memdesc:gabf4176414424ce02a4e03b4338d30521"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the sasl configuration path. <a href="group__sasl.html#gabf4176414424ce02a4e03b4338d30521">More...</a><br /></td></tr>
<tr class="separator:gabf4176414424ce02a4e03b4338d30521"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>SASL secure transport layer. </p>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="ga4d21fddba80d3f88d0529aafe12328b0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4d21fddba80d3f88d0529aafe12328b0">&#9670;&nbsp;</a></span>pn_sasl_t</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="group__sasl.html#ga4d21fddba80d3f88d0529aafe12328b0">pn_sasl_t</a> <a class="el" href="group__sasl.html#ga4d21fddba80d3f88d0529aafe12328b0">pn_sasl_t</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>The SASL layer is responsible for establishing an authenticated and/or encrypted tunnel over which AMQP frames are passed between peers. </p>
<p>The peer acting as the SASL Client must provide authentication credentials. The peer acting as the SASL Server must provide authentication against the received credentials. </p>
</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="gad44e79f52e0669b1930689b56dfa9c3b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad44e79f52e0669b1930689b56dfa9c3b">&#9670;&nbsp;</a></span>pn_sasl_outcome_t</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="group__sasl.html#gad44e79f52e0669b1930689b56dfa9c3b">pn_sasl_outcome_t</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>The result of the SASL negotiation. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ggad44e79f52e0669b1930689b56dfa9c3ba0050b91650a3826a090e13f57b3b941e"></a>PN_SASL_OK&#160;</td><td class="fielddoc"><p>negotiation not completed </p>
</td></tr>
<tr><td class="fieldname"><a id="ggad44e79f52e0669b1930689b56dfa9c3bac63734ecde7c8170554f6bf04f6ce64a"></a>PN_SASL_AUTH&#160;</td><td class="fielddoc"><p>authentication succeeded </p>
</td></tr>
<tr><td class="fieldname"><a id="ggad44e79f52e0669b1930689b56dfa9c3bacd46a2fda23f674c23ed81e6076c1939"></a>PN_SASL_SYS&#160;</td><td class="fielddoc"><p>failed due to bad credentials </p>
</td></tr>
<tr><td class="fieldname"><a id="ggad44e79f52e0669b1930689b56dfa9c3ba03019f909ba1d98aae94437ca4bd0191"></a>PN_SASL_PERM&#160;</td><td class="fielddoc"><p>failed due to a system error </p>
</td></tr>
<tr><td class="fieldname"><a id="ggad44e79f52e0669b1930689b56dfa9c3baee28d2c03fa80dccf771e37aae1bcdf3"></a>PN_SASL_TEMP&#160;</td><td class="fielddoc"><p>failed due to unrecoverable error </p>
</td></tr>
</table>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga7968e80e2fe9360fc14cf865dd1ac21c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7968e80e2fe9360fc14cf865dd1ac21c">&#9670;&nbsp;</a></span>pn_sasl()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__sasl.html#ga4d21fddba80d3f88d0529aafe12328b0">pn_sasl_t</a>* pn_sasl </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__transport.html#gac26eda05f649bbf0399f3d8d78d12fa8">pn_transport_t</a> *&#160;</td>
<td class="paramname"><em>transport</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Construct an Authentication and Security Layer object. </p>
<p>This will return the SASL layer object for the supplied transport object. If there is currently no SASL layer one will be created.</p>
<p>On the client side of an AMQP connection this will have the effect of ensuring that the AMQP SASL layer is used for that connection.</p>
<dl class="section note"><dt>Note</dt><dd>For incoming connections you must call <a class="el" href="group__transport.html#gac5bebd26c0942bc17d7fad36577110f8" title="Configure a transport as a server.">pn_transport_set_server()</a> before <a class="el" href="group__sasl.html#ga7968e80e2fe9360fc14cf865dd1ac21c" title="Construct an Authentication and Security Layer object.">pn_sasl()</a> in order to set up a server SASL configuration.</dd></dl>
<dl class="section return"><dt>Returns</dt><dd>an object representing the SASL layer. </dd></dl>
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="broker_8c-example.html#a37">broker.c</a>, and <a class="el" href="direct_8c-example.html#a64">direct.c</a>.</dd>
</dl>
</div>
</div>
<a id="ga1737191972d5dded0993bf1431e71df0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1737191972d5dded0993bf1431e71df0">&#9670;&nbsp;</a></span>pn_sasl_extended()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool pn_sasl_extended </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Do we support extended SASL negotiation. </p>
<p>Do we support extended SASL negotiation? All implementations of Proton support ANONYMOUS and EXTERNAL on both client and server sides and PLAIN on the client side.</p>
<p>Extended SASL implementations use an external library (Cyrus SASL) to support other mechanisms beyond these basic ones.</p>
<dl class="section return"><dt>Returns</dt><dd>true if we support extended SASL negotiation, false if we only support basic negotiation. </dd></dl>
</div>
</div>
<a id="ga0199871440c4ff89a204cc1d8a09f283"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0199871440c4ff89a204cc1d8a09f283">&#9670;&nbsp;</a></span>pn_sasl_done()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void pn_sasl_done </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__sasl.html#ga4d21fddba80d3f88d0529aafe12328b0">pn_sasl_t</a> *&#160;</td>
<td class="paramname"><em>sasl</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__sasl.html#gad44e79f52e0669b1930689b56dfa9c3b">pn_sasl_outcome_t</a>&#160;</td>
<td class="paramname"><em>outcome</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p><b>Deprecated</b> - Do not use. </p>
<p>There is no correct way to use this API.</p>
<p>Set the outcome of SASL negotiation</p>
<p>Used by the server to set the result of the negotiation process. </p>
</div>
</div>
<a id="ga700e1d505068f895383dd932af55987e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga700e1d505068f895383dd932af55987e">&#9670;&nbsp;</a></span>pn_sasl_get_user()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const char* pn_sasl_get_user </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__sasl.html#ga4d21fddba80d3f88d0529aafe12328b0">pn_sasl_t</a> *&#160;</td>
<td class="paramname"><em>sasl</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Retrieve the authenticated user. </p>
<p>This is usually used at the the server end to find the name of the authenticated user. On the client it will merely return whatever user was passed in to the pn_transport_set_user_password() API.</p>
<p>If <a class="el" href="group__sasl.html#ga03b6daf742db6a07bd7d03cb197aedb6" title="Retrieve the outcome of SASL negotiation.">pn_sasl_outcome()</a> returns a value other than PN_SASL_OK, then there will be no user to return. The returned value is only reliable after the PN_TRANSPORT_AUTHENTICATED event has been received.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">sasl</td><td>the sasl layer</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>If the SASL layer was not negotiated then 0 is returned If the ANONYMOUS mechanism is used then the user will be "anonymous" Otherwise a string containing the user is returned. </dd></dl>
</div>
</div>
<a id="ga895b6a957bf0c0204aaddb3ec5b9d863"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga895b6a957bf0c0204aaddb3ec5b9d863">&#9670;&nbsp;</a></span>pn_sasl_get_mech()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const char* pn_sasl_get_mech </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__sasl.html#ga4d21fddba80d3f88d0529aafe12328b0">pn_sasl_t</a> *&#160;</td>
<td class="paramname"><em>sasl</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Return the selected SASL mechanism. </p>
<p>The returned value is only reliable after the PN_TRANSPORT_AUTHENTICATED event has been received.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">sasl</td><td>the SASL layer</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The authentication mechanism selected by the SASL layer </dd></dl>
</div>
</div>
<a id="ga73299a6a22e141e7911a739590032625"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga73299a6a22e141e7911a739590032625">&#9670;&nbsp;</a></span>pn_sasl_allowed_mechs()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void pn_sasl_allowed_mechs </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__sasl.html#ga4d21fddba80d3f88d0529aafe12328b0">pn_sasl_t</a> *&#160;</td>
<td class="paramname"><em>sasl</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>mechs</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>SASL mechanisms that are to be considered for authentication. </p>
<p>This can be used on either the client or the server to restrict the SASL mechanisms that may be used to the mechanisms on the list.</p>
<dl class="section note"><dt>Note</dt><dd>By default the GSSAPI and GSS-SPNEGO mechanisms are not enabled for clients. This is because these mechanisms have the problematic behaviour of 'capturing' the client whenever they are installed so that they will be used by the client if offered by the server even if the client can't successfully authenticate this way. This can lead to some very hard to debug failures.</dd>
<dd>
The GSSAPI or GSS-SPNEGO mechanisms need to be explicitly enabled if they are required (together with any other required mechanisms).</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">sasl</td><td>the SASL layer </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">mechs</td><td>space separated list of mechanisms that are allowed for authentication </td></tr>
</table>
</dd>
</dl>
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="broker_8c-example.html#a36">broker.c</a>, and <a class="el" href="direct_8c-example.html#a63">direct.c</a>.</dd>
</dl>
</div>
</div>
<a id="gaf472325bc055bb18a5a6f5ca03eda315"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf472325bc055bb18a5a6f5ca03eda315">&#9670;&nbsp;</a></span>pn_sasl_set_allow_insecure_mechs()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void pn_sasl_set_allow_insecure_mechs </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__sasl.html#ga4d21fddba80d3f88d0529aafe12328b0">pn_sasl_t</a> *&#160;</td>
<td class="paramname"><em>sasl</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>insecure</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Boolean to allow use of clear text authentication mechanisms. </p>
<p>By default the SASL layer is configured not to allow mechanisms that disclose the clear text of the password over an unencrypted AMQP connection. This specifically will disallow the use of the PLAIN mechanism without using SSL encryption.</p>
<p>This default is to avoid disclosing password information accidentally over an insecure network.</p>
<p>If you actually wish to use a clear text password unencrypted then you can use this API to set allow_insecure_mechs to true.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">sasl</td><td>the SASL layer </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">insecure</td><td>set this to true to allow unencrypted PLAIN authentication. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="gac53ad15ee429b7ce9d0c598d1e347243"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac53ad15ee429b7ce9d0c598d1e347243">&#9670;&nbsp;</a></span>pn_sasl_get_allow_insecure_mechs()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool pn_sasl_get_allow_insecure_mechs </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__sasl.html#ga4d21fddba80d3f88d0529aafe12328b0">pn_sasl_t</a> *&#160;</td>
<td class="paramname"><em>sasl</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Return the current value for allow_insecure_mechs. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">sasl</td><td>the SASL layer </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="gad1a6932135165f0e5b7639b79ac71c56"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad1a6932135165f0e5b7639b79ac71c56">&#9670;&nbsp;</a></span>pn_sasl_config_name()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void pn_sasl_config_name </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__sasl.html#ga4d21fddba80d3f88d0529aafe12328b0">pn_sasl_t</a> *&#160;</td>
<td class="paramname"><em>sasl</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>name</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the sasl configuration name. </p>
<p>This is used to construct the SASL configuration filename. In the current implementation it ".conf" is added to the name and the file is looked for in the configuration directory.</p>
<p>If not set it will default to "proton-server" for a sasl server and "proton-client" for a client.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">sasl</td><td>the SASL layer </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">name</td><td>the configuration name </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="gabf4176414424ce02a4e03b4338d30521"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gabf4176414424ce02a4e03b4338d30521">&#9670;&nbsp;</a></span>pn_sasl_config_path()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void pn_sasl_config_path </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__sasl.html#ga4d21fddba80d3f88d0529aafe12328b0">pn_sasl_t</a> *&#160;</td>
<td class="paramname"><em>sasl</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>path</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the sasl configuration path. </p>
<p>This is used to tell SASL where to look for the configuration file. In the current implementation it can be a colon separated list of directories.</p>
<p>The environment variable PN_SASL_CONFIG_PATH can also be used to set this path, but if both methods are used then this <a class="el" href="group__sasl.html#gabf4176414424ce02a4e03b4338d30521" title="Set the sasl configuration path.">pn_sasl_config_path()</a> will take precedence.</p>
<p>If not set the underlying implementation default will be used. for a client.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">sasl</td><td>the SASL layer </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">path</td><td>the configuration path </td></tr>
</table>
</dd>
</dl>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="footer">Generated by <a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.8.20 </li>
</ul>
</div>
</body>
</html>