| <!DOCTYPE HTML> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (17) --> |
| <title>OAuthBearerToken (kafka 3.6.1 API)</title> |
| <meta name="viewport" content="width=device-width, initial-scale=1"> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <meta name="description" content="declaration: package: org.apache.kafka.common.security.oauthbearer, interface: OAuthBearerToken"> |
| <meta name="generator" content="javadoc/ClassWriterImpl"> |
| <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../../../script-dir/jquery-ui.min.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../../../jquery-ui.overrides.css" title="Style"> |
| <script type="text/javascript" src="../../../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../../../script-dir/jquery-3.5.1.min.js"></script> |
| <script type="text/javascript" src="../../../../../../script-dir/jquery-ui.min.js"></script> |
| </head> |
| <body class="class-declaration-page"> |
| <script type="text/javascript">var evenRowColor = "even-row-color"; |
| var oddRowColor = "odd-row-color"; |
| var tableTab = "table-tab"; |
| var activeTableTab = "active-table-tab"; |
| var pathtoroot = "../../../../../../"; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <div class="flex-box"> |
| <header role="banner" class="flex-header"> |
| <nav role="navigation"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="top-nav" id="navbar-top"> |
| <div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div> |
| <ul id="navbar-top-firstrow" class="nav-list" title="Navigation"> |
| <li><a href="../../../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="nav-bar-cell1-rev">Class</li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../../help-doc.html#class">Help</a></li> |
| </ul> |
| </div> |
| <div class="sub-nav"> |
| <div> |
| <ul class="sub-nav-list"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method-summary">Method</a></li> |
| </ul> |
| <ul class="sub-nav-list"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method-detail">Method</a></li> |
| </ul> |
| </div> |
| <div class="nav-list-search"><label for="search-input">SEARCH:</label> |
| <input type="text" id="search-input" value="search" disabled="disabled"> |
| <input type="reset" id="reset-button" value="reset" disabled="disabled"> |
| </div> |
| </div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <span class="skip-nav" id="skip-navbar-top"></span></nav> |
| </header> |
| <div class="flex-content"> |
| <main role="main"> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">org.apache.kafka.common.security.oauthbearer</a></div> |
| <h1 title="Interface OAuthBearerToken" class="title">Interface OAuthBearerToken</h1> |
| </div> |
| <section class="class-description" id="class-description"> |
| <hr> |
| <div class="type-signature"><span class="annotations"><a href="../../annotation/InterfaceStability.Evolving.html" title="annotation interface in org.apache.kafka.common.annotation">@Evolving</a> |
| </span><span class="modifiers">public interface </span><span class="element-name type-name-label">OAuthBearerToken</span></div> |
| <div class="block">The <code>b64token</code> value as defined in |
| <a href="https://tools.ietf.org/html/rfc6750#section-2.1">RFC 6750 Section |
| 2.1</a> along with the token's specific scope and lifetime and principal |
| name. |
| <p> |
| A network request would be required to re-hydrate an opaque token, and that |
| could result in (for example) an <code>IOException</code>, but retrievers for |
| various attributes (<a href="#scope()"><code>scope()</code></a>, <a href="#lifetimeMs()"><code>lifetimeMs()</code></a>, etc.) declare no |
| exceptions. Therefore, if a network request is required for any of these |
| retriever methods, that request could be performed at construction time so |
| that the various attributes can be reliably provided thereafter. For example, |
| a constructor might declare <code>throws IOException</code> in such a case. |
| Alternatively, the retrievers could throw unchecked exceptions. |
| <p> |
| This interface was introduced in 2.0.0 and, while it feels stable, it could |
| evolve. We will try to evolve the API in a compatible manner (easier now that |
| Java 7 and its lack of default methods doesn't have to be supported), but we |
| reserve the right to make breaking changes in minor releases, if necessary. |
| We will update the <code>InterfaceStability</code> annotation and this notice once |
| the API is considered stable.</div> |
| <dl class="notes"> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list-long"> |
| <li><a href="https://tools.ietf.org/html/rfc6749#section-1.4">RFC 6749 |
| Section 1.4</a> and |
| <a href="https://tools.ietf.org/html/rfc6750#section-2.1">RFC 6750 |
| Section 2.1</a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| <section class="summary"> |
| <ul class="summary-list"> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <li> |
| <section class="method-summary" id="method-summary"> |
| <h2>Method Summary</h2> |
| <div id="method-summary-table"> |
| <div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab3" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab3', 3)" class="table-tab">Abstract Methods</button></div> |
| <div id="method-summary-table.tabpanel" role="tabpanel"> |
| <div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0"> |
| <div class="table-header col-first">Modifier and Type</div> |
| <div class="table-header col-second">Method</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>long</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#lifetimeMs()" class="member-name-link">lifetimeMs</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">The token's lifetime, expressed as the number of milliseconds since the |
| epoch, as per <a href="https://tools.ietf.org/html/rfc6749#section-1.4">RFC |
| 6749 Section 1.4</a></div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#principalName()" class="member-name-link">principalName</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">The name of the principal to which this credential applies</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Set.html" title="class or interface in java.util" class="external-link">Set</a><<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#scope()" class="member-name-link">scope</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">The token's scope of access, as per |
| <a href="https://tools.ietf.org/html/rfc6749#section-1.4">RFC 6749 Section |
| 1.4</a></div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Long.html" title="class or interface in java.lang" class="external-link">Long</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#startTimeMs()" class="member-name-link">startTimeMs</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">When the credential became valid, in terms of the number of milliseconds |
| since the epoch, if known, otherwise null.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#value()" class="member-name-link">value</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">The <code>b64token</code> value as defined in |
| <a href="https://tools.ietf.org/html/rfc6750#section-2.1">RFC 6750 Section |
| 2.1</a></div> |
| </div> |
| </div> |
| </div> |
| </div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <section class="details"> |
| <ul class="details-list"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <li> |
| <section class="method-details" id="method-detail"> |
| <h2>Method Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="value()"> |
| <h3>value</h3> |
| <div class="member-signature"><span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span> <span class="element-name">value</span>()</div> |
| <div class="block">The <code>b64token</code> value as defined in |
| <a href="https://tools.ietf.org/html/rfc6750#section-2.1">RFC 6750 Section |
| 2.1</a></div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd><code>b64token</code> value as defined in |
| <a href="https://tools.ietf.org/html/rfc6750#section-2.1">RFC 6750 |
| Section 2.1</a></dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="scope()"> |
| <h3>scope</h3> |
| <div class="member-signature"><span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Set.html" title="class or interface in java.util" class="external-link">Set</a><<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>></span> <span class="element-name">scope</span>()</div> |
| <div class="block">The token's scope of access, as per |
| <a href="https://tools.ietf.org/html/rfc6749#section-1.4">RFC 6749 Section |
| 1.4</a></div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>the token's (always non-null but potentially empty) scope of access, |
| as per <a href="https://tools.ietf.org/html/rfc6749#section-1.4">RFC |
| 6749 Section 1.4</a>. Note that all values in the returned set will |
| be trimmed of preceding and trailing whitespace, and the result will |
| never contain the empty string.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="lifetimeMs()"> |
| <h3>lifetimeMs</h3> |
| <div class="member-signature"><span class="return-type">long</span> <span class="element-name">lifetimeMs</span>()</div> |
| <div class="block">The token's lifetime, expressed as the number of milliseconds since the |
| epoch, as per <a href="https://tools.ietf.org/html/rfc6749#section-1.4">RFC |
| 6749 Section 1.4</a></div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>the token'slifetime, expressed as the number of milliseconds since |
| the epoch, as per |
| <a href="https://tools.ietf.org/html/rfc6749#section-1.4">RFC 6749 |
| Section 1.4</a>.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="principalName()"> |
| <h3>principalName</h3> |
| <div class="member-signature"><span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span> <span class="element-name">principalName</span>()</div> |
| <div class="block">The name of the principal to which this credential applies</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>the always non-null/non-empty principal name</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="startTimeMs()"> |
| <h3>startTimeMs</h3> |
| <div class="member-signature"><span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Long.html" title="class or interface in java.lang" class="external-link">Long</a></span> <span class="element-name">startTimeMs</span>()</div> |
| <div class="block">When the credential became valid, in terms of the number of milliseconds |
| since the epoch, if known, otherwise null. An expiring credential may not |
| necessarily indicate when it was created -- just when it expires -- so we |
| need to support a null return value here.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>the time when the credential became valid, in terms of the number of |
| milliseconds since the epoch, if known, otherwise null</dd> |
| </dl> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <!-- ========= END OF CLASS DATA ========= --> |
| </main> |
| </div> |
| </div> |
| </body> |
| </html> |