1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-11-27 17:22:57 +01:00

Deploying to gh-pages from @ 0d12201073 🚀

This commit is contained in:
robjtede 2021-12-29 10:32:44 +00:00
parent 360934a5f3
commit 5edbf22882
7 changed files with 18 additions and 18 deletions

View File

@ -29,7 +29,7 @@ cookie identities are invalidated.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.max_age_secs" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/actix_identity/cookie.rs.html#253-255" title="goto source code">[src]</a></div><a href="#method.max_age_secs" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.max_age_secs" class="fnname">max_age_secs</a>(self, seconds: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -&gt; <a class="struct" href="struct.CookieIdentityPolicy.html" title="struct actix_identity::CookieIdentityPolicy">CookieIdentityPolicy</a></h4></div></summary><div class="docblock"><p>Sets the <code>Max-Age</code> attribute of issued cookies with given number of seconds.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.http_only" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/actix_identity/cookie.rs.html#260-263" title="goto source code">[src]</a></div><a href="#method.http_only" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.http_only" class="fnname">http_only</a>(self, http_only: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Sets the <code>HttpOnly</code> attribute of issued cookies.</p>
<p>By default, the <code>HttpOnly</code> attribute is omitted from issued cookies.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.same_site" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/actix_identity/cookie.rs.html#268-271" title="goto source code">[src]</a></div><a href="#method.same_site" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.same_site" class="fnname">same_site</a>(self, same_site: <a class="enum" href="https://docs.rs/cookie/0.15/cookie/draft/enum.SameSite.html" title="enum cookie::draft::SameSite">SameSite</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Sets the <code>SameSite</code> attribute of issued cookies.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.same_site" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/actix_identity/cookie.rs.html#268-271" title="goto source code">[src]</a></div><a href="#method.same_site" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.same_site" class="fnname">same_site</a>(self, same_site: <a class="enum" href="https://docs.rs/cookie/0.16/cookie/draft/enum.SameSite.html" title="enum cookie::draft::SameSite">SameSite</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Sets the <code>SameSite</code> attribute of issued cookies.</p>
<p>By default, the <code>SameSite</code> attribute is omitted from issued cookies.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.visit_deadline" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/actix_identity/cookie.rs.html#280-283" title="goto source code">[src]</a></div><a href="#method.visit_deadline" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.visit_deadline" class="fnname">visit_deadline</a>(self, deadline: Duration) -&gt; <a class="struct" href="struct.CookieIdentityPolicy.html" title="struct actix_identity::CookieIdentityPolicy">CookieIdentityPolicy</a></h4></div></summary><div class="docblock"><p>Accepts only users who have visited within given deadline.</p>
<p>In other words, invalidate a login after some amount of inactivity. Using this feature

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -44,7 +44,7 @@ the session contains data. Default is <code>false</code>.</p>
<p>If the <code>secure</code> field is set, a cookie will only be transmitted when the
connection is secure - i.e. <code>https</code></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.http_only" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/actix_session/cookie.rs.html#264-267" title="goto source code">[src]</a></div><a href="#method.http_only" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.http_only" class="fnname">http_only</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -&gt; <a class="struct" href="struct.CookieSession.html" title="struct actix_session::CookieSession">CookieSession</a></h4></div></summary><div class="docblock"><p>Sets the <code>http_only</code> field in the session cookie being built.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.same_site" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/actix_session/cookie.rs.html#270-273" title="goto source code">[src]</a></div><a href="#method.same_site" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.same_site" class="fnname">same_site</a>(self, value: <a class="enum" href="https://docs.rs/cookie/0.15/cookie/draft/enum.SameSite.html" title="enum cookie::draft::SameSite">SameSite</a>) -&gt; <a class="struct" href="struct.CookieSession.html" title="struct actix_session::CookieSession">CookieSession</a></h4></div></summary><div class="docblock"><p>Sets the <code>same_site</code> field in the session cookie being built.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.same_site" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/actix_session/cookie.rs.html#270-273" title="goto source code">[src]</a></div><a href="#method.same_site" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.same_site" class="fnname">same_site</a>(self, value: <a class="enum" href="https://docs.rs/cookie/0.16/cookie/draft/enum.SameSite.html" title="enum cookie::draft::SameSite">SameSite</a>) -&gt; <a class="struct" href="struct.CookieSession.html" title="struct actix_session::CookieSession">CookieSession</a></h4></div></summary><div class="docblock"><p>Sets the <code>same_site</code> field in the session cookie being built.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.max_age" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/actix_session/cookie.rs.html#276-278" title="goto source code">[src]</a></div><a href="#method.max_age" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.max_age" class="fnname">max_age</a>(self, seconds: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -&gt; <a class="struct" href="struct.CookieSession.html" title="struct actix_session::CookieSession">CookieSession</a></h4></div></summary><div class="docblock"><p>Sets the <code>max-age</code> field in the session cookie being built.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.max_age_time" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/actix_session/cookie.rs.html#281-284" title="goto source code">[src]</a></div><a href="#method.max_age_time" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.max_age_time" class="fnname">max_age_time</a>(self, value: Duration) -&gt; <a class="struct" href="struct.CookieSession.html" title="struct actix_session::CookieSession">CookieSession</a></h4></div></summary><div class="docblock"><p>Sets the <code>max-age</code> field in the session cookie being built.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.expires_in" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/actix_session/cookie.rs.html#287-289" title="goto source code">[src]</a></div><a href="#method.expires_in" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.expires_in" class="fnname">expires_in</a>(self, seconds: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -&gt; <a class="struct" href="struct.CookieSession.html" title="struct actix_session::CookieSession">CookieSession</a></h4></div></summary><div class="docblock"><p>Sets the <code>expires</code> field in the session cookie being built.</p>

File diff suppressed because one or more lines are too long

View File

@ -1049,7 +1049,7 @@
<span class="kw">fn</span> <span class="ident">remove_cookie</span><span class="op">&lt;</span><span class="ident">B</span><span class="op">&gt;</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">res</span>: <span class="kw-2">&amp;mut</span> <span class="ident">ServiceResponse</span><span class="op">&lt;</span><span class="ident">B</span><span class="op">&gt;</span>) -&gt; <span class="prelude-ty">Result</span><span class="op">&lt;</span>(), <span class="ident">Error</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">cookie</span> <span class="op">=</span> <span class="ident">Cookie::named</span>(<span class="self">self</span>.<span class="ident">name</span>.<span class="ident">clone</span>());
<span class="ident">cookie</span>.<span class="ident">set_value</span>(<span class="string">&quot;&quot;</span>);
<span class="ident">cookie</span>.<span class="ident">set_max_age</span>(<span class="ident">Duration::zero</span>());
<span class="ident">cookie</span>.<span class="ident">set_max_age</span>(<span class="ident">Duration::ZERO</span>);
<span class="ident">cookie</span>.<span class="ident">set_expires</span>(<span class="ident">OffsetDateTime::now_utc</span>() <span class="op">-</span> <span class="ident">Duration::days</span>(<span class="number">365</span>));
<span class="kw">let</span> <span class="ident">val</span> <span class="op">=</span>

View File

@ -693,7 +693,7 @@
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">cookie</span> <span class="op">=</span> <span class="ident">Cookie::named</span>(<span class="self">self</span>.<span class="ident">name</span>.<span class="ident">clone</span>());
<span class="ident">cookie</span>.<span class="ident">set_path</span>(<span class="self">self</span>.<span class="ident">path</span>.<span class="ident">clone</span>());
<span class="ident">cookie</span>.<span class="ident">set_value</span>(<span class="string">&quot;&quot;</span>);
<span class="ident">cookie</span>.<span class="ident">set_max_age</span>(<span class="ident">Duration::zero</span>());
<span class="ident">cookie</span>.<span class="ident">set_max_age</span>(<span class="ident">Duration::ZERO</span>);
<span class="ident">cookie</span>.<span class="ident">set_expires</span>(<span class="ident">OffsetDateTime::now_utc</span>() <span class="op">-</span> <span class="ident">Duration::days</span>(<span class="number">365</span>));
<span class="kw">let</span> <span class="ident">val</span> <span class="op">=</span> <span class="ident">HeaderValue::from_str</span>(<span class="kw-2">&amp;</span><span class="ident">cookie</span>.<span class="ident">to_string</span>())<span class="question-mark">?</span>;