blob: a9bc997e8e60b6a5c214023494c7188ca208aeaa [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>Mechanism (Qpid ProtonJ2 Parent 1.0.0-M9 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Mechanism (Qpid ProtonJ2 Parent 1.0.0-M9 API)";
}
}
catch(err) {
}
//-->
var data = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Mechanism.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">org.apache.qpid.protonj2.engine.sasl.client</a></div>
<h2 title="Interface Mechanism" class="title">Interface Mechanism</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><code><a href="AbstractMechanism.html" title="class in org.apache.qpid.protonj2.engine.sasl.client">AbstractMechanism</a></code>, <code><a href="AnonymousMechanism.html" title="class in org.apache.qpid.protonj2.engine.sasl.client">AnonymousMechanism</a></code>, <code><a href="CramMD5Mechanism.html" title="class in org.apache.qpid.protonj2.engine.sasl.client">CramMD5Mechanism</a></code>, <code><a href="ExternalMechanism.html" title="class in org.apache.qpid.protonj2.engine.sasl.client">ExternalMechanism</a></code>, <code><a href="PlainMechanism.html" title="class in org.apache.qpid.protonj2.engine.sasl.client">PlainMechanism</a></code>, <code><a href="ScramSHA1Mechanism.html" title="class in org.apache.qpid.protonj2.engine.sasl.client">ScramSHA1Mechanism</a></code>, <code><a href="ScramSHA256Mechanism.html" title="class in org.apache.qpid.protonj2.engine.sasl.client">ScramSHA256Mechanism</a></code>, <code><a href="ScramSHA512Mechanism.html" title="class in org.apache.qpid.protonj2.engine.sasl.client">ScramSHA512Mechanism</a></code>, <code><a href="XOauth2Mechanism.html" title="class in org.apache.qpid.protonj2.engine.sasl.client">XOauth2Mechanism</a></code></dd>
</dl>
<hr>
<pre>public interface <span class="typeNameLabel">Mechanism</span></pre>
<div class="block">Interface for all SASL authentication mechanism implementations.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="../../../buffer/ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getChallengeResponse(org.apache.qpid.protonj2.engine.sasl.client.SaslCredentialsProvider,org.apache.qpid.protonj2.buffer.ProtonBuffer)">getChallengeResponse</a></span>&#8203;(<a href="SaslCredentialsProvider.html" title="interface in org.apache.qpid.protonj2.engine.sasl.client">SaslCredentialsProvider</a>&nbsp;credentials,
<a href="../../../buffer/ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;challenge)</code></th>
<td class="colLast">
<div class="block">Create a response based on a given challenge from the remote peer.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="../../../buffer/ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getInitialResponse(org.apache.qpid.protonj2.engine.sasl.client.SaslCredentialsProvider)">getInitialResponse</a></span>&#8203;(<a href="SaslCredentialsProvider.html" title="interface in org.apache.qpid.protonj2.engine.sasl.client">SaslCredentialsProvider</a>&nbsp;credentials)</code></th>
<td class="colLast">
<div class="block">Create an initial response based on selected mechanism.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="../../../types/Symbol.html" title="class in org.apache.qpid.protonj2.types">Symbol</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getName()">getName</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isApplicable(org.apache.qpid.protonj2.engine.sasl.client.SaslCredentialsProvider)">isApplicable</a></span>&#8203;(<a href="SaslCredentialsProvider.html" title="interface in org.apache.qpid.protonj2.engine.sasl.client">SaslCredentialsProvider</a>&nbsp;credentials)</code></th>
<td class="colLast">
<div class="block">Allows the Mechanism to determine if it is a valid choice based on the configured
credentials at the time of selection.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isEnabledByDefault()">isEnabledByDefault</a></span>()</code></th>
<td class="colLast">
<div class="block">Allows the mechanism to indicate if it is enabled by default, or only when explicitly enabled
through configuring the permitted SASL mechanisms.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#verifyCompletion()">verifyCompletion</a></span>()</code></th>
<td class="colLast">
<div class="block">Verifies that the SASL exchange has completed successfully.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="getName()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getName</h4>
<pre class="methodSignature"><a href="../../../types/Symbol.html" title="class in org.apache.qpid.protonj2.types">Symbol</a>&nbsp;getName()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the well known name of this SASL mechanism.</dd>
</dl>
</li>
</ul>
<a id="getInitialResponse(org.apache.qpid.protonj2.engine.sasl.client.SaslCredentialsProvider)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getInitialResponse</h4>
<pre class="methodSignature"><a href="../../../buffer/ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;getInitialResponse&#8203;(<a href="SaslCredentialsProvider.html" title="interface in org.apache.qpid.protonj2.engine.sasl.client">SaslCredentialsProvider</a>&nbsp;credentials)
throws <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.security.sasl/javax/security/sasl/SaslException.html?is-external=true" title="class or interface in javax.security.sasl" class="externalLink">SaslException</a></pre>
<div class="block">Create an initial response based on selected mechanism.
May be null if there is no initial response.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>credentials</code> - The credentials that are supplied for this SASL negotiation.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the initial response, or null if there isn't one.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.security.sasl/javax/security/sasl/SaslException.html?is-external=true" title="class or interface in javax.security.sasl" class="externalLink">SaslException</a></code> - if an error occurs generating the initial response.</dd>
</dl>
</li>
</ul>
<a id="getChallengeResponse(org.apache.qpid.protonj2.engine.sasl.client.SaslCredentialsProvider,org.apache.qpid.protonj2.buffer.ProtonBuffer)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getChallengeResponse</h4>
<pre class="methodSignature"><a href="../../../buffer/ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;getChallengeResponse&#8203;(<a href="SaslCredentialsProvider.html" title="interface in org.apache.qpid.protonj2.engine.sasl.client">SaslCredentialsProvider</a>&nbsp;credentials,
<a href="../../../buffer/ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;challenge)
throws <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.security.sasl/javax/security/sasl/SaslException.html?is-external=true" title="class or interface in javax.security.sasl" class="externalLink">SaslException</a></pre>
<div class="block">Create a response based on a given challenge from the remote peer.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>credentials</code> - The credentials that are supplied for this SASL negotiation.</dd>
<dd><code>challenge</code> - The challenge that this Mechanism should response to.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the response that answers the given challenge.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.security.sasl/javax/security/sasl/SaslException.html?is-external=true" title="class or interface in javax.security.sasl" class="externalLink">SaslException</a></code> - if an error occurs generating the challenge response.</dd>
</dl>
</li>
</ul>
<a id="verifyCompletion()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>verifyCompletion</h4>
<pre class="methodSignature">void&nbsp;verifyCompletion()
throws <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.security.sasl/javax/security/sasl/SaslException.html?is-external=true" title="class or interface in javax.security.sasl" class="externalLink">SaslException</a></pre>
<div class="block">Verifies that the SASL exchange has completed successfully. This is
an opportunity for the mechanism to ensure that all mandatory
steps have been completed successfully and to cleanup and resources
that are held by this Mechanism.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.security.sasl/javax/security/sasl/SaslException.html?is-external=true" title="class or interface in javax.security.sasl" class="externalLink">SaslException</a></code> - if the outcome of the SASL exchange is not valid for this Mechanism</dd>
</dl>
</li>
</ul>
<a id="isApplicable(org.apache.qpid.protonj2.engine.sasl.client.SaslCredentialsProvider)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isApplicable</h4>
<pre class="methodSignature">boolean&nbsp;isApplicable&#8203;(<a href="SaslCredentialsProvider.html" title="interface in org.apache.qpid.protonj2.engine.sasl.client">SaslCredentialsProvider</a>&nbsp;credentials)</pre>
<div class="block">Allows the Mechanism to determine if it is a valid choice based on the configured
credentials at the time of selection.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>credentials</code> - the login credentials available at the time of mechanism selection.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the mechanism can be used with the provided credentials</dd>
</dl>
</li>
</ul>
<a id="isEnabledByDefault()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>isEnabledByDefault</h4>
<pre class="methodSignature">boolean&nbsp;isEnabledByDefault()</pre>
<div class="block">Allows the mechanism to indicate if it is enabled by default, or only when explicitly enabled
through configuring the permitted SASL mechanisms. Any mechanism selection logic should examine
this value along with the configured allowed mechanism and decide if this one should be used.
Typically most mechanisms can be enabled by default but some require explicit configuration
in order to operate which implies that selecting them by default would always cause an authentication
error if that mechanism matches the highest priority value offered by the remote peer.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if this Mechanism is enabled by default.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Mechanism.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small>Copyright &#169; 2022 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</body>
</html>