| <!DOCTYPE html> |
| <html> |
| <head> |
| <meta charset="utf-8"> |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| <title> |
| Class: Qpid::Proton::SASL |
| |
| — Qpid Proton Ruby API |
| |
| </title> |
| |
| <link rel="stylesheet" href="../../css/style.css" type="text/css" /> |
| |
| <link rel="stylesheet" href="../../css/common.css" type="text/css" /> |
| |
| <script type="text/javascript"> |
| pathId = "Qpid::Proton::SASL"; |
| relpath = '../../'; |
| </script> |
| |
| |
| <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script> |
| |
| <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script> |
| |
| |
| </head> |
| <body> |
| <div class="nav_wrap"> |
| <iframe id="nav" src="../../class_list.html?1"></iframe> |
| <div id="resizer"></div> |
| </div> |
| |
| <div id="main" tabindex="-1"> |
| <div id="header"> |
| <div id="menu"> |
| |
| <a href="../../_index.html">Index (S)</a> » |
| <span class='title'><span class='object_link'><a href="../../Qpid.html" title="Qpid (module)">Qpid</a></span></span> » <span class='title'><span class='object_link'><a href="../Proton.html" title="Qpid::Proton (module)">Proton</a></span></span> |
| » |
| <span class="title">SASL</span> |
| |
| </div> |
| |
| <div id="search"> |
| |
| <a class="full_list_link" id="class_list_link" |
| href="../../class_list.html"> |
| |
| <svg width="24" height="24"> |
| <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect> |
| <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect> |
| <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect> |
| </svg> |
| </a> |
| |
| </div> |
| <div class="clear"></div> |
| </div> |
| |
| <div id="content"><h1>Class: Qpid::Proton::SASL |
| |
| |
| |
| </h1> |
| <div class="box_info"> |
| |
| <dl> |
| <dt>Inherits:</dt> |
| <dd> |
| <span class="inheritName">Object</span> |
| |
| <ul class="fullTree"> |
| <li>Object</li> |
| |
| <li class="next">Qpid::Proton::SASL</li> |
| |
| </ul> |
| <a href="#" class="inheritanceTree">show all</a> |
| |
| </dd> |
| </dl> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <dl> |
| <dt>Defined in:</dt> |
| <dd>lib/core/sasl.rb</dd> |
| </dl> |
| |
| </div> |
| |
| <h2>Overview</h2><div class="docstring"> |
| <div class="discussion"> |
| |
| <div class="note notetag"> |
| <strong>Note:</strong> |
| <div class='inline'> |
| <p>Do not instantiate directly, use <span class='object_link'><a href="Transport.html#sasl-instance_method" title="Qpid::Proton::Transport#sasl (method)">Transport#sasl</a></span> to create a SASL object.</p> |
| </div> |
| </div> |
| |
| |
| <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.</p> |
| |
| <p>The peer acting as the SASL server must provide authentication against the received credentials.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div> |
| |
| <h2> |
| Constant Summary |
| <small><a href="#" class="constants_summary_toggle">collapse</a></small> |
| </h2> |
| |
| <dl class="constants"> |
| |
| <dt id="NONE-constant" class="">NONE = |
| <div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Negotation has not completed.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div> |
| </dt> |
| <dd><pre class="code"><span class='const'>Cproton</span><span class='op'>::</span><span class='const'>PN_SASL_NONE</span></pre></dd> |
| |
| <dt id="OK-constant" class="">OK = |
| <div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Authentication succeeded.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div> |
| </dt> |
| <dd><pre class="code"><span class='const'>Cproton</span><span class='op'>::</span><span class='const'>PN_SASL_OK</span></pre></dd> |
| |
| <dt id="AUTH-constant" class="">AUTH = |
| <div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Authentication failed due to bad credentials.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div> |
| </dt> |
| <dd><pre class="code"><span class='const'>Cproton</span><span class='op'>::</span><span class='const'>PN_SASL_AUTH</span></pre></dd> |
| |
| </dl> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <h2> |
| Class Method Summary |
| <small><a href="#" class="summary_toggle">collapse</a></small> |
| </h2> |
| |
| <ul class="summary"> |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#config_name=-class_method" title="config_name= (class method)">.<strong>config_name=</strong>(name) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Set the configuration file name, without extension.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#config_path=-class_method" title="config_path= (class method)">.<strong>config_path=</strong>(path) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Set the sasl configuration path.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#extended%3F-class_method" title="extended? (class method)">.<strong>extended?</strong> ⇒ Bool </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>True if extended SASL negotiation is supported.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| </ul> |
| |
| <h2> |
| Instance Method Summary |
| <small><a href="#" class="summary_toggle">collapse</a></small> |
| </h2> |
| |
| <ul class="summary"> |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#allowed_mechs=-instance_method" title="#allowed_mechs= (instance method)">#<strong>allowed_mechs=</strong>(mechanisms) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Set the mechanisms allowed for SASL negotation.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| </ul> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <div id="class_method_details" class="method_details_list"> |
| <h2>Class Method Details</h2> |
| |
| |
| <div class="method_details first"> |
| <h3 class="signature first" id="config_name=-class_method"> |
| |
| .<strong>config_name=</strong>(name) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Set the configuration file name, without extension</p> |
| |
| <p>The name with an a “.conf” extension will be searched for in the configuration path. If not set, it defaults to “proton-server” or “proton-client” for a server (incoming) or client (outgoing) connection respectively.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| <p class="tag_title">Parameters:</p> |
| <ul class="param"> |
| |
| <li> |
| |
| <span class='name'>name</span> |
| |
| |
| <span class='type'></span> |
| |
| |
| |
| — |
| <div class='inline'> |
| <p>the configuration file name without extension</p> |
| </div> |
| |
| </li> |
| |
| </ul> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 113 |
| 114 |
| 115</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'lib/core/sasl.rb', line 113</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_config_name='>config_name=</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span> |
| <span class='const'>Cproton</span><span class='period'>.</span><span class='id identifier rubyid_pn_sasl_config_name'>pn_sasl_config_name</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="config_path=-class_method"> |
| |
| .<strong>config_path=</strong>(path) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <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 pn_sasl_config_path() will take precedence.</p> |
| |
| <p>If not set the underlying implementation default will be used.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| <p class="tag_title">Parameters:</p> |
| <ul class="param"> |
| |
| <li> |
| |
| <span class='name'>path</span> |
| |
| |
| <span class='type'></span> |
| |
| |
| |
| — |
| <div class='inline'> |
| <p>the configuration path</p> |
| </div> |
| |
| </li> |
| |
| </ul> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 99 |
| 100 |
| 101 |
| 102</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'lib/core/sasl.rb', line 99</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_config_path='>config_path=</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span> |
| <span class='const'>Cproton</span><span class='period'>.</span><span class='id identifier rubyid_pn_sasl_config_path'>pn_sasl_config_path</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_path'>path</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="extended?-class_method"> |
| |
| .<strong>extended?</strong> ⇒ <tt>Bool</tt> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>True if extended SASL negotiation is supported</p> |
| |
| <p>All implementations of Proton support ANONYMOUS and EXTERNAL on both client and server sides and PLAIN on the client side.</p> |
| |
| <p>Extended SASL implememtations use an external library (Cyrus SASL) to support other mechanisms.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| <p class="tag_title">Returns:</p> |
| <ul class="return"> |
| |
| <li> |
| |
| |
| <span class='type'>(<tt>Bool</tt>)</span> |
| |
| |
| |
| — |
| <div class='inline'> |
| <p>true if extended SASL negotiation is supported</p> |
| </div> |
| |
| </li> |
| |
| </ul> |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 80 |
| 81 |
| 82</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'lib/core/sasl.rb', line 80</span> |
| |
| <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_extended?'>extended?</span><span class='lparen'>(</span><span class='rparen'>)</span> |
| <span class='const'>Cproton</span><span class='period'>.</span><span class='id identifier rubyid_pn_sasl_extended'>pn_sasl_extended</span><span class='lparen'>(</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| |
| <div id="instance_method_details" class="method_details_list"> |
| <h2>Instance Method Details</h2> |
| |
| |
| <div class="method_details first"> |
| <h3 class="signature first" id="allowed_mechs=-instance_method"> |
| |
| #<strong>allowed_mechs=</strong>(mechanisms) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Set the mechanisms allowed for SASL negotation</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| <p class="tag_title">Parameters:</p> |
| <ul class="param"> |
| |
| <li> |
| |
| <span class='name'>mechanisms</span> |
| |
| |
| <span class='type'>(<tt>String</tt>)</span> |
| |
| |
| |
| — |
| <div class='inline'> |
| <p>space-delimited list of allowed mechanisms</p> |
| </div> |
| |
| </li> |
| |
| </ul> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 64 |
| 65 |
| 66</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'lib/core/sasl.rb', line 64</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_allowed_mechs='>allowed_mechs=</span><span class='lparen'>(</span><span class='id identifier rubyid_mechanisms'>mechanisms</span><span class='rparen'>)</span> |
| <span class='const'>Cproton</span><span class='period'>.</span><span class='id identifier rubyid_pn_sasl_allowed_mechs'>pn_sasl_allowed_mechs</span><span class='lparen'>(</span><span class='ivar'>@impl</span><span class='comma'>,</span> <span class='id identifier rubyid_mechanisms'>mechanisms</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| |
| </div> |
| |
| <div id="footer"> |
| Generated on Tue Jun 6 11:01:30 2023 by |
| <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> |
| 0.9.28 (ruby-3.1.3). |
| </div> |
| |
| </div> |
| </body> |
| </html> |