<!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="../static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><linkrel="stylesheet"href="../static.files/normalize-76eba96aa4d2e634.css"><linkrel="stylesheet"href="../static.files/rustdoc-93196c7a1c3542a8.css"id="mainThemeStyle"><linkrel="stylesheet"id="themeStyle"href="../static.files/light-4743e13df3dfe8c4.css"><linkrel="stylesheet"disabledhref="../static.files/dark-0e1b889528bd466b.css"><linkrel="stylesheet"disabledhref="../static.files/ayu-65289d5d067c7c66.css"><scriptid="default-settings"></script><scriptsrc="../static.files/storage-d43fa987303ecbbb.js"></script><scriptdefersrc="sidebar-items.js"></script><scriptdefersrc="../static.files/main-3367e395607fafc1.js"></script><noscript><linkrel="stylesheet"href="../static.files/noscript-13285aec31fa243e.css"></noscript><linkrel="alternate icon"type="image/png"href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><linkrel="alternate icon"type="image/png"href="../static.files/favicon-32x32-422f7d1d52889060.png"><linkrel="icon"type="image/svg+xml"href="../static.files/favicon-2c020d218678b618.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="logo-container"href="../kanidm_cli/index.html"><imgclass="rust-logo"src="../static.files/rust-logo-151179464ae7ed46.svg"alt="logo"></a><h2></h2></nav><navclass="sidebar"><aclass="logo-container"href="../kanidm_cli/index.html"><imgclass="rust-logo"src="../static.files/rust-logo-151179464ae7ed46.svg"alt="logo"></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="blo
</details>}</code></pre></div><h2id="variants"class="variants small-section-header">Variants<ahref="#variants"class="anchor">§</a></h2><divclass="variants"><sectionid="variant.List"class="variant"><ahref="#variant.List"class="anchor">§</a><h3class="code-header">List(<aclass="struct"href="struct.CommonOpt.html"title="struct kanidm_cli::CommonOpt">CommonOpt</a>)</h3></section><divclass="docblock"><p>List all configured oauth2 resource servers</p>
</div><sectionid="variant.Get"class="variant"><ahref="#variant.Get"class="anchor">§</a><h3class="code-header">Get(<aclass="struct"href="struct.Named.html"title="struct kanidm_cli::Named">Named</a>)</h3></section><divclass="docblock"><p>Display a selected oauth2 resource server</p>
</div><sectionid="variant.CreateBasic"class="variant"><ahref="#variant.CreateBasic"class="anchor">§</a><h3class="code-header">CreateBasic(<aclass="struct"href="struct.Oauth2BasicCreateOpt.html"title="struct kanidm_cli::Oauth2BasicCreateOpt">Oauth2BasicCreateOpt</a>)</h3></section><divclass="docblock"><p>Create a new oauth2 resource server</p>
</div><sectionid="variant.UpdateScopeMap"class="variant"><ahref="#variant.UpdateScopeMap"class="anchor">§</a><h3class="code-header">UpdateScopeMap(<aclass="struct"href="struct.Oauth2CreateScopeMapOpt.html"title="struct kanidm_cli::Oauth2CreateScopeMapOpt">Oauth2CreateScopeMapOpt</a>)</h3></section><divclass="docblock"><p>Update or add a new mapping from a group to scopes that it provides to members</p>
</div><sectionid="variant.DeleteScopeMap"class="variant"><ahref="#variant.DeleteScopeMap"class="anchor">§</a><h3class="code-header">DeleteScopeMap(<aclass="struct"href="struct.Oauth2DeleteScopeMapOpt.html"title="struct kanidm_cli::Oauth2DeleteScopeMapOpt">Oauth2DeleteScopeMapOpt</a>)</h3></section><divclass="docblock"><p>Remove a mapping from groups to scopes</p>
</div><sectionid="variant.UpdateSupScopeMap"class="variant"><ahref="#variant.UpdateSupScopeMap"class="anchor">§</a><h3class="code-header">UpdateSupScopeMap(<aclass="struct"href="struct.Oauth2CreateScopeMapOpt.html"title="struct kanidm_cli::Oauth2CreateScopeMapOpt">Oauth2CreateScopeMapOpt</a>)</h3></section><divclass="docblock"><p>Update or add a new mapping from a group to scopes that it provides to members</p>
</div><sectionid="variant.DeleteSupScopeMap"class="variant"><ahref="#variant.DeleteSupScopeMap"class="anchor">§</a><h3class="code-header">DeleteSupScopeMap(<aclass="struct"href="struct.Oauth2DeleteScopeMapOpt.html"title="struct kanidm_cli::Oauth2DeleteScopeMapOpt">Oauth2DeleteScopeMapOpt</a>)</h3></section><divclass="docblock"><p>Remove a mapping from groups to scopes</p>
</div><sectionid="variant.ResetSecrets"class="variant"><ahref="#variant.ResetSecrets"class="anchor">§</a><h3class="code-header">ResetSecrets(<aclass="struct"href="struct.Named.html"title="struct kanidm_cli::Named">Named</a>)</h3></section><divclass="docblock"><p>Reset the secrets associated to this resource server</p>
</div><sectionid="variant.ShowBasicSecret"class="variant"><ahref="#variant.ShowBasicSecret"class="anchor">§</a><h3class="code-header">ShowBasicSecret(<aclass="struct"href="struct.Named.html"title="struct kanidm_cli::Named">Named</a>)</h3></section><divclass="docblock"><p>Show the associated basic secret for this resource server</p>
</div><sectionid="variant.Delete"class="variant"><ahref="#variant.Delete"class="anchor">§</a><h3class="code-header">Delete(<aclass="struct"href="struct.Named.html"title="struct kanidm_cli::Named">Named</a>)</h3></section><divclass="docblock"><p>Delete a oauth2 resource server</p>
</div><sectionid="variant.SetDisplayname"class="variant"><ahref="#variant.SetDisplayname"class="anchor">§</a><h3class="code-header">SetDisplayname(<aclass="struct"href="struct.Oauth2SetDisplayname.html"title="struct kanidm_cli::Oauth2SetDisplayname">Oauth2SetDisplayname</a>)</h3></section><divclass="docblock"><p>Set a new displayname for a resource server</p>
</div><sectionid="variant.SetName"class="variant"><ahref="#variant.SetName"class="anchor">§</a><h3class="code-header">SetName</h3></section><divclass="sub-variant"id="variant.SetName.fields"><h4>Fields</h4><divclass="sub-variant-field"><spanid="variant.SetName.field.nopt"class="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="small-section-header"><ahref="#variant.SetName.field.name"class="anchor field">§</a><code>name: <aclass="struct"href="https://doc.rust-lang.org/1.68.0/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><sectionid="variant.SetLandingUrl"class="variant"><ahref="#variant.SetLandingUrl"class="anchor">§</a><h3class="code-header">SetLandingUrl</h3></section><divclass="sub-variant"id="variant.SetLandingUrl.fields"><h4>Fields</h4><divclass="sub-variant-field"><spanid="variant.SetLandingUrl.field.nopt"class="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="small-section-header"><ahref="#variant.SetLandingUrl.field.url"class="anchor field">§</a><code>url: <aclass="struct"href="https://doc.rust-lang.org/1.68.0/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><sectionid="variant.EnablePkce"class="variant"><ahref="#variant.EnablePkce"class="anchor">§</a><h3class="code-header">EnablePkce(<aclass="struct"href="struct.Named.html"title="struct kanidm_cli::Named">Named</a>)</h3></section><divclass="docblock"><p>Enable PKCE on this oauth2 resource server. This defaults to being enabled.</p>
</div><sectionid="variant.DisablePkce"class="variant"><ahref="#variant.DisablePkce"class="anchor">§</a><h3class="code-header">DisablePkce(<aclass="struct"href="struct.Named.html"title="struct kanidm_cli::Named">Named</a>)</h3></section><divclass="docblock"><p>Disable PKCE on this oauth2 resource server to work around insecure clients that
</div><sectionid="variant.EnableLegacyCrypto"class="variant"><ahref="#variant.EnableLegacyCrypto"class="anchor">§</a><h3class="code-header">EnableLegacyCrypto(<aclass="struct"href="struct.Named.html"title="struct kanidm_cli::Named">Named</a>)</h3></section><divclass="docblock"><p>Enable legacy signing crypto on this oauth2 resource server. This defaults to being disabled.
</div><sectionid="variant.DisableLegacyCrypto"class="variant"><ahref="#variant.DisableLegacyCrypto"class="anchor">§</a><h3class="code-header">DisableLegacyCrypto(<aclass="struct"href="struct.Named.html"title="struct kanidm_cli::Named">Named</a>)</h3></section><divclass="docblock"><p>Disable legacy signing crypto on this oauth2 resource server. This is the default.</p>
</div><sectionid="variant.PreferShortUsername"class="variant"><ahref="#variant.PreferShortUsername"class="anchor">§</a><h3class="code-header">PreferShortUsername(<aclass="struct"href="struct.Named.html"title="struct kanidm_cli::Named">Named</a>)</h3></section><divclass="docblock"><p>Use the ‘name’ attribute instead of ‘spn’ for the preferred_username</p>
</div><sectionid="variant.PreferSPNUsername"class="variant"><ahref="#variant.PreferSPNUsername"class="anchor">§</a><h3class="code-header">PreferSPNUsername(<aclass="struct"href="struct.Named.html"title="struct kanidm_cli::Named">Named</a>)</h3></section><divclass="docblock"><p>Use the ‘spn’ attribute instead of ‘name’ for the preferred_username</p>
</div></details></div></details><detailsclass="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="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="fn">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="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="fn">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
<code><ahref="https://doc.rust-lang.org/1.68.0/core/convert/trait.From.html"title="From">From</a><T> for U</code> chooses to do.</p>
</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-Same%3CT%3E-for-Oauth2Opt"class="impl has-srclink"><aclass="srclink rightside"href="https://docs.rs/typenum/1.16.0/src/typenum/type_operators.rs.html#34">source</a><ahref="#impl-Same%3CT%3E-for-Oauth2Opt"class="anchor">§</a><h3class="code-header">impl<T><aclass="trait"href="https://docs.rs/typenum/1.16.0/typenum/type_operators/trait.Same.html"title="trait typenum::type_operators::Same">Same</a><T> for T</h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Output"class="associatedtype trait-impl has-srclink"><ahref="#associatedtype.Output"class="anchor">§</a><h4class="code-header">type <ahref="https://docs.rs/typenum/1.16.0/typenum/type_operators/trait.Same.html#associatedtype.Output"class="associatedtype">Output</a> = T</h4></section></summary><divclass='docblock'>Should always be <code>Self</code></div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-TryFrom%3CU%3E-for-Oauth2Opt"class="impl has-srclink"><aclass="srclink rightside"href="https://doc.rust-lang.org/1.68.0/src/core/convert/mod.rs.html#775">source</a><ahref="#impl-TryFrom%3CU%3E-for-Oauth2Opt"class="anchor">§</a><h3class="code-header">impl<T, U><aclass="trait"href="https://doc.rust-lang.org/1.68.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U> for T<spanclass="where fmt-newline">where<br> U: <aclass="trait"href="https://doc.rust-lang.org/1.68.0/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><T>,</span></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Error"class="associatedtype trait-impl has-srclink"><ahref="#associatedtype.Error"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.68.0/core/convert/trait.TryFrom.html#associatedtype.Error"class="associatedtype">Error</a> = <aclass="enum"href="https://doc.rust-lang.org/1.68.0/core/convert/enum.Infallible.html"title="enum core::convert::Infallible">Infallible</a></h4></section></summary><divclass='docblock'>The type returned in the event of a conversion error.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.try_from"class="method trait-impl has-srclink"><spanclass="rightside"><spanclass="since"title="const unstable">const: <ahref="https://github.com/rust-lang/rust/issues/88674"title="Tracking issue for const_convert">unstable</a></span> · <aclass="srclink"href="https://doc.rust-lang.org/1.68.0/src/core/convert/mod.rs.html#781">source</a></span><ahref="#method.try_from"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.68.0/core/convert/trait.TryFrom.html#tymethod.try_from"class="fn">try_from</a>(value: U) -><aclass="enum"href="https://doc.rust-lang.org/1.68.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><T, <T as <aclass="trait"href="https://doc.rust-lang.org/1.68.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.68.0/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><divclass='docblock'>Performs the conversion.</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-TryInto%3CU%3E-for-Oauth2Opt"class="impl has-srclink"><aclass="srclink rightside"href="https://doc.rust-lang.org/1.68.0/src/core/convert/mod.rs.html#760">source</a><ahref="#impl-TryInto%3CU%3E-for-Oauth2Opt"class="anchor">§</a><h3class="code-header">impl<T, U><aclass="trait"href="https://doc.rust-lang.org/1.68.0/core/convert/trait.TryInto.html"title="trait core::convert::TryInto">TryInto</a><U> for T<span
<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="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="fn">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