<!DOCTYPE html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1.0"><metaname="generator"content="rustdoc"><metaname="description"content="API documentation for the Rust `Oauth2Opt` enum in crate `kanidm_cli`."><metaname="keywords"content="rust, rustlang, rust-lang, Oauth2Opt"><title>Oauth2Opt in kanidm_cli - Rust</title><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../SourceSerif4-Regular.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../FiraSans-Regular.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../FiraSans-Medium.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../SourceCodePro-Regular.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../SourceSerif4-Bold.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../SourceCodePro-Semibold.ttf.woff2"><linkrel="stylesheet"href="../normalize.css"><linkrel="stylesheet"href="../rustdoc.css"id="mainThemeStyle"><linkrel="stylesheet"href="../ayu.css"disabled><linkrel="stylesheet"href="../dark.css"disabled><linkrel="stylesheet"href="../light.css"id="themeStyle"><scriptid="default-settings"></script><scriptsrc="../storage.js"></script><scriptdefersrc="sidebar-items.js"></script><scriptdefersrc="../main.js"></script><noscript><linkrel="stylesheet"href="../noscript.css"></noscript><linkrel="alternate icon"type="image/png"href="../favicon-16x16.png"><linkrel="alternate icon"type="image/png"href="../favicon-32x32.png"><linkrel="icon"type="image/svg+xml"href="../favicon.svg"></head><bodyclass="rustdoc enum"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><navclass="mobile-topbar"><buttonclass="sidebar-menu-toggle">☰</button><aclass="sidebar-logo"href="../kanidm_cli/index.html"><divclass="logo-container"><imgclass="rust-logo"src="../rust-logo.svg"alt="logo"></div></a><h2></h2></nav><navclass="sidebar"><aclass="sidebar-logo"href="../kanidm_cli/index.html"><divclass="logo-container"><imgclass="rust-logo"src="../rust-logo.svg"alt="logo"></div></a><h2class="location"><ahref="#">Oauth2Opt</a></h2><divclass="sidebar-elems"><section><h3><ahref="#variants">Variants</a></h3><ulclass="block"><li><ahref="#variant.CreateBasic">CreateBasic</a></li><li><ahref="#variant.Delete">Delete</a></li><li><ahref="#variant.DeleteScopeMap">DeleteScopeMap</a></li><li><ahref="#variant.DeleteSupScopeMap">DeleteSupScopeMap</a></li><li><ahref="#variant.DisableLegacyCrypto">DisableLegacyCrypto</a></li><li><ahref="#variant.DisablePkce">DisablePkce</a></li><li><ahref="#variant.EnableLegacyCrypto">EnableLegacyCrypto</a></li><li><ahref="#variant.EnablePkce">EnablePkce</a></li><li><ahref="#variant.Get">Get</a></li><li><ahref="#variant.List">List</a></li><li><ahref="#variant.PreferSPNUsername">PreferSPNUsername</a></li><li><ahref="#variant.PreferShortUsername">PreferShortUsername</a></li><li><ahref="#variant.ResetSecrets">ResetSecrets</a></li><li><ahref="#variant.SetDisplayname">SetDisplayname</a></li><li><ahref="#variant.SetLandingUrl">SetLandingUrl</a></li><li><ahref="#variant.SetName">SetName</a></li><li><ahref="#variant.ShowBasicSecret">ShowBasicSecret</a></li><li><ahref="#variant.UpdateScopeMap">UpdateScopeMap</a></li><li><ahref="#variant.UpdateSupScopeMap">UpdateSupScopeMap</a></li></ul><h3><ahref="#implementations">Methods</a></h3><ulclass="block"><li><ahref="#method.debug">debug</a></li><li><ahref="#method.exec">exec</a></li></ul><h3><ahref="#trait-implementations">Trait Implementations</a></h3><ulclass="block"><li><ahref="#impl-Debug-for-Oauth2Opt">Debug</a></li><li><ahref="#impl-FromArgMatches-for-Oauth2Opt">FromArgMatches</a></li><li><ahref="#impl-Subcommand-for-Oauth2Opt">Subcommand</a></li></ul><h3><ahref="#synthetic-implementations">Auto Trait Implementations</a></h3><ulclass="block"><li><ahref="#impl-RefUnwindSafe-for-Oaut
</details>}</code></pre></div><h2id="variants"class="variants small-section-header">Variants<ahref="#variants"class="anchor"></a></h2><h3id="variant.List"class="variant small-section-header"><ahref="#variant.List"class="anchor field"></a><code>List(<aclass="struct"href="struct.CommonOpt.html"title="struct kanidm_cli::CommonOpt">CommonOpt</a>)</code></h3><divclass="docblock"><p>List all configured oauth2 resource servers</p>
</div><h3id="variant.Get"class="variant small-section-header"><ahref="#variant.Get"class="anchor field"></a><code>Get(<aclass="struct"href="struct.Named.html"title="struct kanidm_cli::Named">Named</a>)</code></h3><divclass="docblock"><p>Display a selected oauth2 resource server</p>
</div><h3id="variant.CreateBasic"class="variant small-section-header"><ahref="#variant.CreateBasic"class="anchor field"></a><code>CreateBasic(<aclass="struct"href="struct.Oauth2BasicCreateOpt.html"title="struct kanidm_cli::Oauth2BasicCreateOpt">Oauth2BasicCreateOpt</a>)</code></h3><divclass="docblock"><p>Create a new oauth2 resource server</p>
</div><h3id="variant.UpdateScopeMap"class="variant small-section-header"><ahref="#variant.UpdateScopeMap"class="anchor field"></a><code>UpdateScopeMap(<aclass="struct"href="struct.Oauth2CreateScopeMapOpt.html"title="struct kanidm_cli::Oauth2CreateScopeMapOpt">Oauth2CreateScopeMapOpt</a>)</code></h3><divclass="docblock"><p>Update or add a new mapping from a group to scopes that it provides to members</p>
</div><h3id="variant.DeleteScopeMap"class="variant small-section-header"><ahref="#variant.DeleteScopeMap"class="anchor field"></a><code>DeleteScopeMap(<aclass="struct"href="struct.Oauth2DeleteScopeMapOpt.html"title="struct kanidm_cli::Oauth2DeleteScopeMapOpt">Oauth2DeleteScopeMapOpt</a>)</code></h3><divclass="docblock"><p>Remove a mapping from groups to scopes</p>
</div><h3id="variant.UpdateSupScopeMap"class="variant small-section-header"><ahref="#variant.UpdateSupScopeMap"class="anchor field"></a><code>UpdateSupScopeMap(<aclass="struct"href="struct.Oauth2CreateScopeMapOpt.html"title="struct kanidm_cli::Oauth2CreateScopeMapOpt">Oauth2CreateScopeMapOpt</a>)</code></h3><divclass="docblock"><p>Update or add a new mapping from a group to scopes that it provides to members</p>
</div><h3id="variant.DeleteSupScopeMap"class="variant small-section-header"><ahref="#variant.DeleteSupScopeMap"class="anchor field"></a><code>DeleteSupScopeMap(<aclass="struct"href="struct.Oauth2DeleteScopeMapOpt.html"title="struct kanidm_cli::Oauth2DeleteScopeMapOpt">Oauth2DeleteScopeMapOpt</a>)</code></h3><divclass="docblock"><p>Remove a mapping from groups to scopes</p>
</div><h3id="variant.ResetSecrets"class="variant small-section-header"><ahref="#variant.ResetSecrets"class="anchor field"></a><code>ResetSecrets(<aclass="struct"href="struct.Named.html"title="struct kanidm_cli::Named">Named</a>)</code></h3><divclass="docblock"><p>Reset the secrets associated to this resource server</p>
</div><h3id="variant.ShowBasicSecret"class="variant small-section-header"><ahref="#variant.ShowBasicSecret"class="anchor field"></a><code>ShowBasicSecret(<aclass="struct"href="struct.Named.html"title="struct kanidm_cli::Named">Named</a>)</code></h3><divclass="docblock"><p>Show the associated basic secret for this resource server</p>
</div><h3id="variant.Delete"class="variant small-section-header"><ahref="#variant.Delete"class="anchor field"></a><code>Delete(<aclass="struct"href="struct.Named.html"title="struct kanidm_cli::Named">Named</a>)</code></h3><divclass="docblock"><p>Delete a oauth2 resource server</p>
</div><h3id="variant.SetDisplayname"class="variant small-section-header"><ahref="#variant.SetDisplayname"class="anchor field"></a><code>SetDisplayname(<aclass="struct"href="struct.Oauth2SetDisplayname.html"title="struct kanidm_cli::Oauth2SetDisplayname">Oauth2SetDisplayname</a>)</code></h3><divclass="docblock"><p>Set a new displayname for a resource server</p>
</div><h3id="variant.SetName"class="variant small-section-header"><ahref="#variant.SetName"class="anchor field"></a><code>SetName</code></h3><divclass="sub-variant"id="variant.SetName.fields"><h4>Fields</h4><divclass="sub-variant-field"><spanid="variant.SetName.field.nopt"class="variant small-section-header"><ahref="#variant.SetName.field.nopt"class="anchor field"></a><code>nopt: <aclass="struct"href="struct.Named.html"title="struct kanidm_cli::Named">Named</a></code></span></div><divclass="sub-variant-field"><spanid="variant.SetName.field.name"class="variant small-section-header"><ahref="#variant.SetName.field.name"class="anchor field"></a><code>name: <aclass="struct"href="https://doc.rust-lang.org/1.66.1/alloc/string/struct.String.html"title="struct alloc::string::String">String</a></code></span></div></div><divclass="docblock"><p>Set a new name for this resource server. You may need to update
</div><h3id="variant.SetLandingUrl"class="variant small-section-header"><ahref="#variant.SetLandingUrl"class="anchor field"></a><code>SetLandingUrl</code></h3><divclass="sub-variant"id="variant.SetLandingUrl.fields"><h4>Fields</h4><divclass="sub-variant-field"><spanid="variant.SetLandingUrl.field.nopt"class="variant small-section-header"><ahref="#variant.SetLandingUrl.field.nopt"class="anchor field"></a><code>nopt: <aclass="struct"href="struct.Named.html"title="struct kanidm_cli::Named">Named</a></code></span></div><divclass="sub-variant-field"><spanid="variant.SetLandingUrl.field.url"class="variant small-section-header"><ahref="#variant.SetLandingUrl.field.url"class="anchor field"></a><code>url: <aclass="struct"href="https://doc.rust-lang.org/1.66.1/alloc/string/struct.String.html"title="struct alloc::string::String">String</a></code></span></div></div><divclass="docblock"><p>When redirecting from the Kanidm Apps Listing page, some linked applications may need to
</div><h3id="variant.EnablePkce"class="variant small-section-header"><ahref="#variant.EnablePkce"class="anchor field"></a><code>EnablePkce(<aclass="struct"href="struct.Named.html"title="struct kanidm_cli::Named">Named</a>)</code></h3><divclass="docblock"><p>Enable PKCE on this oauth2 resource server. This defaults to being enabled.</p>
</div><h3id="variant.DisablePkce"class="variant small-section-header"><ahref="#variant.DisablePkce"class="anchor field"></a><code>DisablePkce(<aclass="struct"href="struct.Named.html"title="struct kanidm_cli::Named">Named</a>)</code></h3><divclass="docblock"><p>Disable PKCE on this oauth2 resource server to work around insecure clients that
may not support it. You should request the client to enable PKCE!</p>
</div><h3id="variant.EnableLegacyCrypto"class="variant small-section-header"><ahref="#variant.EnableLegacyCrypto"class="anchor field"></a><code>EnableLegacyCrypto(<aclass="struct"href="struct.Named.html"title="struct kanidm_cli::Named">Named</a>)</code></h3><divclass="docblock"><p>Enable legacy signing crypto on this oauth2 resource server. This defaults to being disabled.
You only need to enable this for openid clients that do not support modern crytopgraphic
operations.</p>
</div><h3id="variant.DisableLegacyCrypto"class="variant small-section-header"><ahref="#variant.DisableLegacyCrypto"class="anchor field"></a><code>DisableLegacyCrypto(<aclass="struct"href="struct.Named.html"title="struct kanidm_cli::Named">Named</a>)</code></h3><divclass="docblock"><p>Disable legacy signing crypto on this oauth2 resource server. This is the default.</p>
</div><h3id="variant.PreferShortUsername"class="variant small-section-header"><ahref="#variant.PreferShortUsername"class="anchor field"></a><code>PreferShortUsername(<aclass="struct"href="struct.Named.html"title="struct kanidm_cli::Named">Named</a>)</code></h3><divclass="docblock"><p>Use the ‘name’ attribute instead of ‘spn’ for the preferred_username</p>
</div><h3id="variant.PreferSPNUsername"class="variant small-section-header"><ahref="#variant.PreferSPNUsername"class="anchor field"></a><code>PreferSPNUsername(<aclass="struct"href="struct.Named.html"title="struct kanidm_cli::Named">Named</a>)</code></h3><divclass="docblock"><p>Use the ‘spn’ attribute instead of ‘name’ for the preferred_username</p>
</div></details></div></details><detailsclass="rustdoc-toggle implementors-toggle"><summary><sectionid="impl-Instrument-for-Oauth2Opt"class="impl has-srclink"><aclass="srclink rightside"href="https://docs.rs/tracing/0.1.37/src/tracing/instrument.rs.html#276">source</a><ahref="#impl-Instrument-for-Oauth2Opt"class="anchor"></a><h3class="code-header">impl<T><aclass="trait"href="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.Instrument.html"title="trait tracing::instrument::Instrument">Instrument</a> for T</h3></section></summary><divclass="impl-items"><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.instrument"class="method trait-impl has-srclink"><aclass="srclink rightside"href="https://docs.rs/tracing/0.1.37/src/tracing/instrument.rs.html#82">source</a><ahref="#method.instrument"class="anchor"></a><h4class="code-header">fn <ahref="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.Instrument.html#method.instrument"class="fnname">instrument</a>(self, span: <aclass="struct"href="https://docs.rs/tracing/0.1.37/tracing/span/struct.Span.html"title="struct tracing::span::Span">Span</a>) -><aclass="struct"href="https://docs.rs/tracing/0.1.37/tracing/instrument/struct.Instrumented.html"title="struct tracing::instrument::Instrumented">Instrumented</a><Self></h4></section></summary><divclass='docblock'>Instruments this type with the provided <ahref="https://docs.rs/tracing/0.1.37/tracing/span/struct.Span.html"title="Span"><code>Span</code></a>, returning an
<code>Instrumented</code> wrapper. <ahref="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.Instrument.html#method.instrument">Read more</a></div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.in_current_span"class="method trait-impl has-srclink"><aclass="srclink rightside"href="https://docs.rs/tracing/0.1.37/src/tracing/instrument.rs.html#121">source</a><ahref="#method.in_current_span"class="anchor"></a><h4class="code-header">fn <ahref="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.Instrument.html#method.in_current_span"class="fnname">in_current_span</a>(self) -><aclass="struct"href="https://docs.rs/tracing/0.1.37/tracing/instrument/struct.Instrumented.html"title="struct tracing::instrument::Instrumented">Instrumented</a><Self></h4></section></summary><divclass='docblock'>Instruments this type with the <ahref="https://docs.rs/tracing/0.1.37/tracing/span/struct.Span.html#method.current">current</a><ahref="https://docs.rs/tracing/0.1.37/tracing/span/struct.Span.html"><code>Span</code></a>, returning an
<ahref="https://docs.rs/tracing/0.1.37/tracing/instrument/struct.WithDispatch.html"title="WithDispatch"><code>WithDispatch</code></a> wrapper. <ahref="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.WithSubscriber.html#method.with_subscriber">Read more</a></div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.with_current_subscriber"class="method trait-impl has-srclink"><aclass="srclink rightside"href="https://docs.rs/tracing/0.1.37/src/tracing/instrument.rs.html#221">source</a><ahref="#method.with_current_subscriber"class="anchor"></a><h4class="code-header">fn <ahref="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.WithSubscriber.html#method.with_current_subscriber"class="fnname">with_current_subscriber</a>(self) -><aclass="struct"href="https://docs.rs/tracing/0.1.37/tracing/instrument/struct.WithDispatch.html"title="struct tracing::instrument::WithDispatch">WithDispatch</a><Self></h4></section></summary><divclass='docblock'>Attaches the current <ahref="https://docs.rs/tracing/0.1.37/tracing/dispatcher/index.html#setting-the-default-subscriber">default</a><ahref="https://docs.rs/tracing-core/0.1.22/tracing_core/subscriber/trait.Subscriber.html"><code>Subscriber</code></a> to this type, returning a