mirror of
https://github.com/actix/actix-extras.git
synced 2025-08-31 19:37:00 +02:00
Deploying to gh-pages from @ a325f5dd02
🚀
This commit is contained in:
@@ -111,4 +111,4 @@
|
||||
<span class="macro">assert!</span>(<span class="ident">AllOrSome::Some</span>(()).<span class="ident">is_some</span>());
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_cors" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_cors" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -1283,4 +1283,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_cors" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_cors" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -99,4 +99,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_cors" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_cors" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -767,4 +767,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_cors" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_cors" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -121,4 +121,4 @@
|
||||
<span class="kw">use</span> <span class="ident">inner</span>::{<span class="ident">Inner</span>, <span class="ident">OriginFn</span>};
|
||||
<span class="kw">pub</span> <span class="kw">use</span> <span class="ident">middleware::CorsMiddleware</span>;
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_cors" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_cors" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -527,4 +527,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_cors" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_cors" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -201,4 +201,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_identity" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_identity" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -529,4 +529,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_identity" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_identity" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -53,4 +53,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_identity" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_identity" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -199,4 +199,4 @@
|
||||
<span class="kw">pub</span> <span class="kw">use</span> <span class="ident"><span class="self">self</span>::identity_ext::IdentityExt</span>;
|
||||
<span class="kw">pub</span> <span class="kw">use</span> <span class="ident"><span class="self">self</span>::middleware::IdentityMiddleware</span>;
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_identity" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_identity" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -511,4 +511,4 @@
|
||||
<span class="ident">LogOut</span>,
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_identity" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_identity" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -243,4 +243,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_limitation" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_limitation" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -85,4 +85,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_limitation" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_limitation" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -319,4 +319,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_limitation" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_limitation" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -207,4 +207,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_limitation" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_limitation" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -237,4 +237,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_limitation" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_limitation" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -665,4 +665,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_protobuf" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_protobuf" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -57,4 +57,4 @@
|
||||
<span class="attribute">#[<span class="ident">cfg</span>(<span class="ident">feature</span> <span class="op">=</span> <span class="string">"web"</span>)]</span>
|
||||
<span class="kw">impl</span> <span class="ident">actix_web::ResponseError</span> <span class="kw">for</span> <span class="ident">Error</span> {}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_redis" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_redis" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -285,4 +285,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_redis" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_redis" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -369,16 +369,44 @@
|
||||
<span id="367">367</span>
|
||||
<span id="368">368</span>
|
||||
<span id="369">369</span>
|
||||
<span id="370">370</span>
|
||||
<span id="371">371</span>
|
||||
<span id="372">372</span>
|
||||
<span id="373">373</span>
|
||||
<span id="374">374</span>
|
||||
<span id="375">375</span>
|
||||
<span id="376">376</span>
|
||||
<span id="377">377</span>
|
||||
<span id="378">378</span>
|
||||
<span id="379">379</span>
|
||||
<span id="380">380</span>
|
||||
<span id="381">381</span>
|
||||
<span id="382">382</span>
|
||||
<span id="383">383</span>
|
||||
<span id="384">384</span>
|
||||
<span id="385">385</span>
|
||||
<span id="386">386</span>
|
||||
<span id="387">387</span>
|
||||
<span id="388">388</span>
|
||||
<span id="389">389</span>
|
||||
<span id="390">390</span>
|
||||
<span id="391">391</span>
|
||||
<span id="392">392</span>
|
||||
<span id="393">393</span>
|
||||
<span id="394">394</span>
|
||||
<span id="395">395</span>
|
||||
<span id="396">396</span>
|
||||
</pre><pre class="rust"><code><span class="doccomment">//! Configuration options to tune the behaviour of [`SessionMiddleware`].</span>
|
||||
|
||||
<span class="kw">use</span> <span class="ident">actix_web::cookie</span>::{<span class="ident">time::Duration</span>, <span class="ident">Key</span>, <span class="ident">SameSite</span>};
|
||||
<span class="kw">use</span> <span class="ident">derive_more::From</span>;
|
||||
|
||||
<span class="kw">use</span> <span class="kw">crate</span>::{<span class="ident">storage::SessionStore</span>, <span class="ident">SessionMiddleware</span>};
|
||||
|
||||
<span class="doccomment">/// Determines what type of session cookie should be used and how its lifecycle should be managed.</span>
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// Used by [`SessionMiddlewareBuilder::session_lifecycle`].</span>
|
||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>, <span class="ident">Clone</span>)]</span>
|
||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>, <span class="ident">Clone</span>, <span class="ident">From</span>)]</span>
|
||||
<span class="attribute">#[<span class="ident">non_exhaustive</span>]</span>
|
||||
<span class="kw">pub</span> <span class="kw">enum</span> <span class="ident">SessionLifecycle</span> {
|
||||
<span class="doccomment">/// The session cookie will expire when the current browser session ends.</span>
|
||||
@@ -398,18 +426,6 @@
|
||||
<span class="ident">PersistentSession</span>(<span class="ident">PersistentSession</span>),
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">From</span><span class="op"><</span><span class="ident">BrowserSession</span><span class="op">></span> <span class="kw">for</span> <span class="ident">SessionLifecycle</span> {
|
||||
<span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">session</span>: <span class="ident">BrowserSession</span>) -> <span class="self">Self</span> {
|
||||
<span class="ident"><span class="self">Self</span>::BrowserSession</span>(<span class="ident">session</span>)
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">From</span><span class="op"><</span><span class="ident">PersistentSession</span><span class="op">></span> <span class="kw">for</span> <span class="ident">SessionLifecycle</span> {
|
||||
<span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">session</span>: <span class="ident">PersistentSession</span>) -> <span class="self">Self</span> {
|
||||
<span class="ident"><span class="self">Self</span>::PersistentSession</span>(<span class="ident">session</span>)
|
||||
}
|
||||
}
|
||||
|
||||
<span class="doccomment">/// A [session lifecycle](SessionLifecycle) strategy where the session cookie expires when the</span>
|
||||
<span class="doccomment">/// browser's current session ends.</span>
|
||||
<span class="doccomment">///</span>
|
||||
@@ -417,6 +433,9 @@
|
||||
<span class="doccomment">/// continue running in the background when the browser is closed—session cookies are not deleted</span>
|
||||
<span class="doccomment">/// and they will still be available when the browser is opened again. Check the documentation of</span>
|
||||
<span class="doccomment">/// the browsers you are targeting for up-to-date information.</span>
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// Due to its `Into<SessionLifecycle>` implementation, a `BrowserSession` can be passed directly</span>
|
||||
<span class="doccomment">/// to [`SessionMiddlewareBuilder::session_lifecycle()`].</span>
|
||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>, <span class="ident">Clone</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">BrowserSession</span> {
|
||||
<span class="ident">state_ttl</span>: <span class="ident">Duration</span>,
|
||||
@@ -474,6 +493,26 @@
|
||||
<span class="doccomment">/// Persistent cookies have a pre-determined expiration, specified via the `Max-Age` or `Expires`</span>
|
||||
<span class="doccomment">/// attribute. They do not disappear when the current browser session ends.</span>
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// Due to its `Into<SessionLifecycle>` implementation, a `PersistentSession` can be passed directly</span>
|
||||
<span class="doccomment">/// to [`SessionMiddlewareBuilder::session_lifecycle()`].</span>
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// # Examples</span>
|
||||
<span class="doccomment">/// ```</span>
|
||||
<span class="doccomment">/// use actix_web::cookie::time::Duration;</span>
|
||||
<span class="doccomment">/// use actix_session::SessionMiddleware;</span>
|
||||
<span class="doccomment">/// use actix_session::config::{PersistentSession, TtlExtensionPolicy};</span>
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// const SECS_IN_WEEK: i64 = 60 * 60 * 24 * 7;</span>
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// // a session lifecycle with a time-to-live (expiry) of 1 week and default extension policy</span>
|
||||
<span class="doccomment">/// PersistentSession::default().session_ttl(Duration::seconds(SECS_IN_WEEK));</span>
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// // a session lifecycle with the default time-to-live (expiry) and a custom extension policy</span>
|
||||
<span class="doccomment">/// PersistentSession::default()</span>
|
||||
<span class="doccomment">/// // this policy causes the session state's TTL to be refreshed on every request</span>
|
||||
<span class="doccomment">/// .session_ttl_extension_policy(TtlExtensionPolicy::OnEveryRequest);</span>
|
||||
<span class="doccomment">/// ```</span>
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// [persistent]: https://www.whitehatsec.com/glossary/content/persistent-session-cookie</span>
|
||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>, <span class="ident">Clone</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">PersistentSession</span> {
|
||||
@@ -484,10 +523,10 @@
|
||||
<span class="kw">impl</span> <span class="ident">PersistentSession</span> {
|
||||
<span class="doccomment">/// Specifies how long the session cookie should live.</span>
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// Defaults to 1 day if left unspecified.</span>
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// The session TTL is also used as the TTL for the session state in the storage backend.</span>
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// Defaults to 1 day.</span>
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// A persistent session can live more than the specified TTL if the TTL is extended.</span>
|
||||
<span class="doccomment">/// See [`session_ttl_extension_policy`](Self::session_ttl_extension_policy) for more details.</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">session_ttl</span>(<span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">session_ttl</span>: <span class="ident">Duration</span>) -> <span class="self">Self</span> {
|
||||
@@ -498,7 +537,7 @@
|
||||
<span class="doccomment">/// Determines under what circumstances the TTL of your session should be extended.</span>
|
||||
<span class="doccomment">/// See [`TtlExtensionPolicy`] for more details.</span>
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// Defaults to [`TtlExtensionPolicy::OnStateChanges`] if left unspecified.</span>
|
||||
<span class="doccomment">/// Defaults to [`TtlExtensionPolicy::OnStateChanges`].</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">session_ttl_extension_policy</span>(
|
||||
<span class="kw-2">mut</span> <span class="self">self</span>,
|
||||
<span class="ident">ttl_extension_policy</span>: <span class="ident">TtlExtensionPolicy</span>,
|
||||
@@ -519,23 +558,23 @@
|
||||
|
||||
<span class="doccomment">/// Configuration for which events should trigger an extension of the time-to-live for your session.</span>
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// If you are using a [`BrowserSession`], `TtlExtensionPolicy` controls how often the TTL of</span>
|
||||
<span class="doccomment">/// the session state should be refreshed. The browser is in control of the lifecycle of the</span>
|
||||
<span class="doccomment">/// session cookie.</span>
|
||||
<span class="doccomment">/// If you are using a [`BrowserSession`], `TtlExtensionPolicy` controls how often the TTL of the</span>
|
||||
<span class="doccomment">/// session state should be refreshed. The browser is in control of the lifecycle of the session</span>
|
||||
<span class="doccomment">/// cookie.</span>
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// If you are using a [`PersistentSession`], `TtlExtensionPolicy` controls both the expiration</span>
|
||||
<span class="doccomment">/// of the session cookie and the TTL of the session state.</span>
|
||||
<span class="doccomment">/// If you are using a [`PersistentSession`], `TtlExtensionPolicy` controls both the expiration of</span>
|
||||
<span class="doccomment">/// the session cookie and the TTL of the session state on the storage backend.</span>
|
||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>, <span class="ident">Clone</span>)]</span>
|
||||
<span class="attribute">#[<span class="ident">non_exhaustive</span>]</span>
|
||||
<span class="kw">pub</span> <span class="kw">enum</span> <span class="ident">TtlExtensionPolicy</span> {
|
||||
<span class="doccomment">/// The TTL is refreshed every time the server receives a request associated with a session.</span>
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// # Performance impact</span>
|
||||
<span class="doccomment">/// Refreshing the TTL on every request is not free.</span>
|
||||
<span class="doccomment">/// It implies a refresh of the TTL on the session state. This translates into a request over</span>
|
||||
<span class="doccomment">/// the network if you are using a remote system as storage backend (e.g. Redis).</span>
|
||||
<span class="doccomment">/// This impacts both the total load on your storage backend (i.e. number of</span>
|
||||
<span class="doccomment">/// queries it has to handle) and the latency of the requests served by your server.</span>
|
||||
<span class="doccomment">/// Refreshing the TTL on every request is not free. It implies a refresh of the TTL on the</span>
|
||||
<span class="doccomment">/// session state. This translates into a request over the network if you are using a remote</span>
|
||||
<span class="doccomment">/// system as storage backend (e.g. Redis). This impacts both the total load on your storage</span>
|
||||
<span class="doccomment">/// backend (i.e. number of queries it has to handle) and the latency of the requests served by</span>
|
||||
<span class="doccomment">/// your server.</span>
|
||||
<span class="ident">OnEveryRequest</span>,
|
||||
|
||||
<span class="doccomment">/// The TTL is refreshed every time the session state changes or the session key is renewed.</span>
|
||||
@@ -568,8 +607,7 @@
|
||||
<span class="ident">TtlExtensionPolicy::OnStateChanges</span>
|
||||
}
|
||||
|
||||
<span class="doccomment">/// A fluent builder to construct a [`SessionMiddleware`] instance with custom configuration</span>
|
||||
<span class="doccomment">/// parameters.</span>
|
||||
<span class="doccomment">/// A fluent, customized [`SessionMiddleware`] builder.</span>
|
||||
<span class="attribute">#[<span class="ident">must_use</span>]</span>
|
||||
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">SessionMiddlewareBuilder</span><span class="op"><</span><span class="ident">Store</span>: <span class="ident">SessionStore</span><span class="op">></span> {
|
||||
<span class="ident">storage_backend</span>: <span class="ident">Store</span>,
|
||||
@@ -607,6 +645,22 @@
|
||||
<span class="doccomment">/// Check out [`SessionLifecycle`]'s documentation for more details on the available options.</span>
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// Default is [`SessionLifecycle::BrowserSession`].</span>
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// # Examples</span>
|
||||
<span class="doccomment">/// ```</span>
|
||||
<span class="doccomment">/// use actix_web::cookie::{Key, time::Duration};</span>
|
||||
<span class="doccomment">/// use actix_session::{SessionMiddleware, config::PersistentSession};</span>
|
||||
<span class="doccomment">/// use actix_session::storage::CookieSessionStore;</span>
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// const SECS_IN_WEEK: i64 = 60 * 60 * 24 * 7;</span>
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// // creates a session middleware with a time-to-live (expiry) of 1 week</span>
|
||||
<span class="doccomment">/// SessionMiddleware::builder(CookieSessionStore::default(), Key::from(&[0; 64]))</span>
|
||||
<span class="doccomment">/// .session_lifecycle(</span>
|
||||
<span class="doccomment">/// PersistentSession::default().session_ttl(Duration::seconds(SECS_IN_WEEK))</span>
|
||||
<span class="doccomment">/// )</span>
|
||||
<span class="doccomment">/// .build();</span>
|
||||
<span class="doccomment">/// ```</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">session_lifecycle</span><span class="op"><</span><span class="ident">S</span>: <span class="ident">Into</span><span class="op"><</span><span class="ident">SessionLifecycle</span><span class="op">></span><span class="op">></span>(<span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">session_lifecycle</span>: <span class="ident">S</span>) -> <span class="self">Self</span> {
|
||||
<span class="kw">match</span> <span class="ident">session_lifecycle</span>.<span class="ident">into</span>() {
|
||||
<span class="ident">SessionLifecycle::BrowserSession</span>(<span class="ident">BrowserSession</span> {
|
||||
@@ -739,4 +793,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_session" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_session" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -1465,4 +1465,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_session" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_session" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -500,6 +500,16 @@
|
||||
<span class="doccomment">/// [`SessionStore`]);</span>
|
||||
<span class="doccomment">/// - a secret key, to sign or encrypt the content of client-side session cookie.</span>
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// # How did we choose defaults?</span>
|
||||
<span class="doccomment">/// You should not regret adding `actix-session` to your dependencies and going to production using</span>
|
||||
<span class="doccomment">/// the default configuration. That is why, when in doubt, we opt to use the most secure option for</span>
|
||||
<span class="doccomment">/// each configuration parameter.</span>
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// We expose knobs to change the default to suit your needs—i.e., if you know what you are doing,</span>
|
||||
<span class="doccomment">/// we will not stop you. But being a subject-matter expert should not be a requirement to deploy</span>
|
||||
<span class="doccomment">/// reasonably secure implementation of sessions.</span>
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// # Examples</span>
|
||||
<span class="doccomment">/// ```no_run</span>
|
||||
<span class="doccomment">/// use actix_web::{web, App, HttpServer, HttpResponse, Error};</span>
|
||||
<span class="doccomment">/// use actix_session::{Session, SessionMiddleware, storage::RedisActorSessionStore};</span>
|
||||
@@ -568,16 +578,6 @@
|
||||
<span class="doccomment">/// .await</span>
|
||||
<span class="doccomment">/// }</span>
|
||||
<span class="doccomment">/// ```</span>
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// ## How did we choose defaults?</span>
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// You should not regret adding `actix-session` to your dependencies and going to production using</span>
|
||||
<span class="doccomment">/// the default configuration. That is why, when in doubt, we opt to use the most secure option for</span>
|
||||
<span class="doccomment">/// each configuration parameter.</span>
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// We expose knobs to change the default to suit your needs—i.e., if you know what you are doing,</span>
|
||||
<span class="doccomment">/// we will not stop you. But being a subject-matter expert should not be a requirement to deploy</span>
|
||||
<span class="doccomment">/// reasonably secure implementation of sessions.</span>
|
||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">SessionMiddleware</span><span class="op"><</span><span class="ident">Store</span>: <span class="ident">SessionStore</span><span class="op">></span> {
|
||||
<span class="ident">storage_backend</span>: <span class="ident">Rc</span><span class="op"><</span><span class="ident">Store</span><span class="op">></span>,
|
||||
@@ -590,7 +590,7 @@
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// To create a new instance of [`SessionMiddleware`] you need to provide:</span>
|
||||
<span class="doccomment">/// - an instance of the session storage backend you wish to use (i.e. an implementation of</span>
|
||||
<span class="doccomment">/// [`SessionStore]);</span>
|
||||
<span class="doccomment">/// [`SessionStore`]);</span>
|
||||
<span class="doccomment">/// - a secret key, to sign or encrypt the content of client-side session cookie.</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">store</span>: <span class="ident">Store</span>, <span class="ident">key</span>: <span class="ident">Key</span>) -> <span class="self">Self</span> {
|
||||
<span class="ident"><span class="self">Self</span>::builder</span>(<span class="ident">store</span>, <span class="ident">key</span>).<span class="ident">build</span>()
|
||||
@@ -600,7 +600,7 @@
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// It takes as input the two required inputs to create a new instance of [`SessionMiddleware`]:</span>
|
||||
<span class="doccomment">/// - an instance of the session storage backend you wish to use (i.e. an implementation of</span>
|
||||
<span class="doccomment">/// [`SessionStore]);</span>
|
||||
<span class="doccomment">/// [`SessionStore`]);</span>
|
||||
<span class="doccomment">/// - a secret key, to sign or encrypt the content of client-side session cookie.</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">builder</span>(<span class="ident">store</span>: <span class="ident">Store</span>, <span class="ident">key</span>: <span class="ident">Key</span>) -> <span class="ident">SessionMiddlewareBuilder</span><span class="op"><</span><span class="ident">Store</span><span class="op">></span> {
|
||||
<span class="ident">SessionMiddlewareBuilder::new</span>(<span class="ident">store</span>, <span class="ident">config::default_configuration</span>(<span class="ident">key</span>))
|
||||
@@ -927,4 +927,4 @@
|
||||
<span class="prelude-val">Ok</span>(())
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_session" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_session" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -649,4 +649,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_session" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_session" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -77,4 +77,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_session" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_session" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -243,4 +243,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_session" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_session" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -231,4 +231,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_session" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_session" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -53,4 +53,4 @@
|
||||
<span class="attribute">#[<span class="ident">cfg</span>(<span class="ident">feature</span> <span class="op">=</span> <span class="string">"redis-rs-session"</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">use</span> <span class="ident">redis_rs</span>::{<span class="ident">RedisSessionStore</span>, <span class="ident">RedisSessionStoreBuilder</span>};
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_session" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_session" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -631,4 +631,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_session" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_session" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -695,4 +695,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_session" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_session" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -117,4 +117,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_session" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_session" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -39,4 +39,4 @@
|
||||
<span class="ident">String::from_utf8</span>(<span class="ident">value</span>).<span class="ident">unwrap</span>().<span class="ident">try_into</span>().<span class="ident">unwrap</span>()
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_session" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_session" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -283,4 +283,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_settings" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_settings" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -1611,4 +1611,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_settings" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_settings" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -81,4 +81,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_settings" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_settings" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -187,4 +187,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_settings" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_settings" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -141,4 +141,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_settings" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_settings" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -191,4 +191,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_settings" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_settings" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -135,4 +135,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_settings" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_settings" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -135,4 +135,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_settings" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_settings" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -131,4 +131,4 @@
|
||||
<span class="kw">pub</span> <span class="ident">tls</span>: <span class="ident">Tls</span>,
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_settings" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_settings" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -55,4 +55,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_settings" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_settings" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -133,4 +133,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_settings" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_settings" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -197,4 +197,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_settings" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_settings" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -37,4 +37,4 @@
|
||||
<span class="kw">pub</span> <span class="ident">private_key</span>: <span class="ident">PathBuf</span>,
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_settings" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_settings" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -223,4 +223,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -287,4 +287,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -41,4 +41,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -157,4 +157,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -17,4 +17,4 @@
|
||||
<span class="kw">pub</span> <span class="kw">use</span> <span class="ident"><span class="self">self</span>::config::AuthExtractorConfig</span>;
|
||||
<span class="kw">pub</span> <span class="kw">use</span> <span class="ident"><span class="self">self</span>::errors::AuthenticationError</span>;
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -143,4 +143,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -167,4 +167,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -17,4 +17,4 @@
|
||||
<span class="kw">pub</span> <span class="kw">use</span> <span class="ident"><span class="self">self</span>::header::Authorization</span>;
|
||||
<span class="kw">pub</span> <span class="kw">use</span> <span class="ident"><span class="self">self</span>::scheme</span>::{<span class="ident">basic::Basic</span>, <span class="ident">bearer::Bearer</span>, <span class="ident">Scheme</span>};
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -389,4 +389,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -275,4 +275,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -27,4 +27,4 @@
|
||||
<span class="kw">fn</span> <span class="ident">parse</span>(<span class="ident">header</span>: <span class="kw-2">&</span><span class="ident">HeaderValue</span>) -> <span class="prelude-ty">Result</span><span class="op"><</span><span class="self">Self</span>, <span class="ident">ParseError</span><span class="op">></span>;
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -7,4 +7,4 @@
|
||||
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">authorization</span>;
|
||||
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">www_authenticate</span>;
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -271,4 +271,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -141,4 +141,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../../../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../../../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -283,4 +283,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../../../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../../../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -99,4 +99,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../../../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../../../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -53,4 +53,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../../../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../../../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -23,4 +23,4 @@
|
||||
<span class="kw">fn</span> <span class="ident">to_bytes</span>(<span class="kw-2">&</span><span class="self">self</span>) -> <span class="ident">Bytes</span>;
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -69,4 +69,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -13,4 +13,4 @@
|
||||
<span class="kw">pub</span> <span class="kw">use</span> <span class="ident"><span class="self">self</span>::challenge</span>::{<span class="ident">basic</span>, <span class="ident">bearer</span>, <span class="ident">Challenge</span>};
|
||||
<span class="kw">pub</span> <span class="kw">use</span> <span class="ident"><span class="self">self</span>::header::WwwAuthenticate</span>;
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -47,4 +47,4 @@
|
||||
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">middleware</span>;
|
||||
<span class="kw">mod</span> <span class="ident">utils</span>;
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -833,4 +833,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
@@ -223,4 +223,4 @@
|
||||
}
|
||||
}
|
||||
</code></pre></div>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (2befdefdd 2022-08-06)" ></div></body></html>
|
||||
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="actix_web_httpauth" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0-nightly (d394408fb 2022-08-07)" ></div></body></html>
|
Reference in New Issue
Block a user