<!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="The currently authenticated user, and any required metadata for them to properly authorise them. This is similar in nature to oauth and the krb PAC/PAD structures. This information is transparent to clients and CAN be parsed by them!"><metaname="keywords"content="rust, rustlang, rust-lang, UserAuthToken"><title>UserAuthToken in kanidm_proto::v1 - 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 struct"><!--[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_proto/index.html"><divclass="logo-container"><imgclass="rust-logo"src="../../rust-logo.svg"alt="logo"></div></a><h2class="location"></h2></nav><navclass="sidebar"><aclass="sidebar-logo"href="../../kanidm_proto/index.html"><divclass="logo-container"><imgclass="rust-logo"src="../../rust-logo.svg"alt="logo"></div></a><h2class="location"><ahref="#">UserAuthToken</a></h2><divclass="sidebar-elems"><section><divclass="block"><h3class="sidebar-title"><ahref="#fields">Fields</a></h3><ul><li><ahref="#structfield.auth_type">auth_type</a></li><li><ahref="#structfield.displayname">displayname</a></li><li><ahref="#structfield.expiry">expiry</a></li><li><ahref="#structfield.issued_at">issued_at</a></li><li><ahref="#structfield.mail_primary">mail_primary</a></li><li><ahref="#structfield.purpose">purpose</a></li><li><ahref="#structfield.session_id">session_id</a></li><li><ahref="#structfield.spn">spn</a></li><li><ahref="#structfield.ui_hints">ui_hints</a></li><li><ahref="#structfield.uuid">uuid</a></li></ul></div><divclass="block"><h3class="sidebar-title"><ahref="#implementations">Methods</a></h3><ul><li><ahref="#method.name">name</a></li></ul></div><divclass="block"><h3class="sidebar-title"><ahref="#trait-implementations">Trait Implementations</a></h3><ul><li><ahref="#impl-Clone-for-UserAuthToken">Clone</a></li><li><ahref="#impl-Debug-for-UserAuthToken">Debug</a></li><li><ahref="#impl-Deserialize%3C%27de%3E-for-UserAuthToken">Deserialize<'de></a></li><li><ahref="#impl-Display-for-UserAuthToken">Display</a></li><li><ahref="#impl-Eq-for-UserAuthToken">Eq</a></li><li><ahref="#impl-PartialEq%3CUserAuthToken%3E-for-UserAuthToken">PartialEq<UserAuthToken></a></li><li><ahref="#impl-Serialize-for-UserAuthToken">Serialize</a></li></ul></div><divclass="block"><h3class="sidebar-title"><ahref="#synthetic-implementations">Auto T
}</code></pre></div><detailsclass="rustdoc-toggle top-doc"open><summaryclass="hideme"><span>Expand description</span></summary><divclass="docblock"><p>The currently authenticated user, and any required metadata for them
to properly authorise them. This is similar in nature to oauth and the krb
PAC/PAD structures. This information is transparent to clients and CAN
be parsed by them!</p>
<p>This structure and how it works will <em>very much</em> change over time from this
point onward! This means on updates, that sessions will invalidate in many
</div></details><h2id="fields"class="fields small-section-header">Fields<ahref="#fields"class="anchor"></a></h2><spanid="structfield.session_id"class="structfield small-section-header"><ahref="#structfield.session_id"class="anchor field"></a><code>session_id: <aclass="struct"href="https://docs.rs/uuid/1.2.1/uuid/struct.Uuid.html"title="struct uuid::Uuid">Uuid</a></code></span><spanid="structfield.auth_type"class="structfield small-section-header"><ahref="#structfield.auth_type"class="anchor field"></a><code>auth_type: <aclass="enum"href="enum.AuthType.html"title="enum kanidm_proto::v1::AuthType">AuthType</a></code></span><spanid="structfield.issued_at"class="structfield small-section-header"><ahref="#structfield.issued_at"class="anchor field"></a><code>issued_at: OffsetDateTime</code></span><spanid="structfield.expiry"class="structfield small-section-header"><ahref="#structfield.expiry"class="anchor field"></a><code>expiry: <aclass="enum"href="https://doc.rust-lang.org/1.65.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><OffsetDateTime></code></span><divclass="docblock"><p>If none, there is no expiry, and this is always valid. If there is
by <code>==</code>. <ahref="https://doc.rust-lang.org/1.65.0/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.ne"class="method trait-impl has-srclink"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="srclink"href="https://doc.rust-lang.org/1.65.0/src/core/cmp.rs.html#236">source</a></span><ahref="#method.ne"class="anchor"></a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.65.0/core/cmp/trait.PartialEq.html#method.ne"class="fnname">ne</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.65.0/std/primitive.reference.html">&</a>Rhs) -><aclass="primitive"href="https://doc.rust-lang.org/1.65.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
sufficient, and should not be overridden without very good reason. <ahref="https://doc.rust-lang.org/1.65.0/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><detailsclass="rustdoc-toggle implementors-toggle"open><summary><sectionid="impl-Serialize-for-UserAuthToken"class="impl has-srclink"><aclass="srclink rightside"href="../../src/kanidm_proto/v1.rs.html#384">source</a><ahref="#impl-Serialize-for-UserAuthToken"class="anchor"></a><h3class="code-header in-band">impl <aclass="trait"href="https://docs.rs/serde/1.0.147/serde/ser/trait.Serialize.html"title="trait serde::ser::Serialize">Serialize</a> for <aclass="struct"href="struct.UserAuthToken.html"title="struct kanidm_proto::v1::UserAuthToken">UserAuthToken</a></h3></section></summary><divclass="impl-items"><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.serialize"class="method trait-impl has-srclink"><aclass="srclink rightside"href="../../src/kanidm_proto/v1.rs.html#384">source</a><ahref="#method.serialize"class="anchor"></a><h4class="code-header">fn <ahref="https://docs.rs/serde/1.0.147/serde/ser/trait.Serialize.html#tymethod.serialize"class="fnname">serialize</a><__S>(&self, __serializer: __S) -><aclass="enum"href="https://doc.rust-lang.org/1.65.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><__S::<aclass="associatedtype"href="https://docs.rs/serde/1.0.147/serde/ser/trait.Serializer.html#associatedtype.Ok"title="type serde::ser::Serializer::Ok">Ok</a>, __S::<aclass="associatedtype"href="https://docs.rs/serde/1.0.147/serde/ser/trait.Serializer.html#associatedtype.Error"title="type serde::ser::Serializer::Error">Error</a>><spanclass="where fmt-newline">where<br> __S: <aclass="trait"href="https://docs.rs/serde/1.0.147/serde/ser/trait.Serializer.html"title="trait serde::ser::Serializer">Serializer</a>,</span></h4></section></summary><divclass='docblock'>Serialize this value into the given Serde serializer. <ahref="https://docs.rs/serde/1.0.147/serde/ser/trait.Serialize.html#tymethod.serialize">Read more</a></div></details></div></details><sectionid="impl-Eq-for-UserAuthToken"class="impl has-srclink"><aclass="srclink rightside"href="../../src/kanidm_proto/v1.rs.html#439">source</a><ahref="#impl-Eq-for-UserAuthToken"class="anchor"></a><h3class="code-header in-band">impl <aclass="trait"href="https://doc.rust-lang.org/1.65.0/core/cmp/trait.Eq.html"title="trait core::cmp::Eq">Eq</a> for <aclass="struct"href="struct.UserAuthToken.html"title="struct kanidm_proto::v1::UserAuthToken">UserAuthToken</a></h3></section></div><h2id="synthetic-implementations"class="small-section-header">Auto Trait Implementations<ahref="#synthetic-implementations"class="anchor"></a></h2><divid="synthetic-implementations-list"><sectionid="impl-RefUnwindSafe-for-UserAuthToken"class="impl has-srclink"><ahref="#impl-RefUnwindSafe-for-UserAuthToken"class="anchor"></a><h3class="code-header in-band">impl <aclass="trait"href="https://doc.rust-lang.org/1.65.0/core/panic/unwind_safe/trait.RefUnwindSafe.html"title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <aclass="struct"href="struct.UserAuthToken.html"title="struct kanidm_proto::v1::UserAuthToken">UserAuthToken</a></h3></section><sectionid="impl-Send-for-UserAuthToken"class="impl has-srclink"><ahref="#impl-Send-for-UserAuthToken"class="anchor"></a><h3class="code-header in-band">impl <aclass="trait"href="https://doc.rust-lang.org/1.65.0/core/marker/trait.Send.html"title="trait core::marker::Send">Send</a> for <aclass="struct"href="struct.UserAuthToken.html"title="struct kanidm_proto::v1::UserAuthToken">UserAuthToken</a></h3></section><sectionid="impl-Sync-for-UserAuthToken"class="impl has-srclink"><ahref="#impl-Sync-for-UserAuthToken"class="anchor"></a><h3class="code-header in-band">impl <aclass="trait"href="https://doc.rust-lang.org/1.65.0/core/marker/trait.Sync.html"title="trait core::marker::Sync">Sync</a> for