mirror of
https://github.com/actix/actix-extras.git
synced 2025-08-30 11:08:08 +02:00
Deploying to gh-pages from @ 56051786a6
🚀
This commit is contained in:
@@ -2,12 +2,12 @@
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a class="sidebar-logo" href='../../actix_web_httpauth/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct AuthenticationError</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.challenge_mut">challenge_mut</a><a href="#method.new">new</a><a href="#method.status_code_mut">status_code_mut</a><a href="#method.with_error">with_error</a><a href="#method.with_error_description">with_error_description</a><a href="#method.with_error_uri">with_error_uri</a></div><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-Debug">Debug</a><a href="#impl-Display">Display</a><a href="#impl-Error">Error</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-ResponseError">ResponseError</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-ToString">ToString</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a><a href="#impl-WithSubscriber">WithSubscriber</a></div></div><h2 class="location">Other items in<br><a href="../index.html">actix_web_httpauth</a>::<wbr><a href="index.html">extractors</a></h2><div id="sidebar-vars" data-name="AuthenticationError" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container rust-logo" href='../../actix_web_httpauth/index.html'><img src='../../rust-logo.png' alt='logo'></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">actix_web_httpauth</a>::<wbr><a href="index.html">extractors</a>::<wbr><a class="struct" href="#">AuthenticationError</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/actix_web_httpauth/extractors/errors.rs.html#15-18" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust struct"><code>pub struct AuthenticationError<C: <a class="trait" href="../headers/www_authenticate/trait.Challenge.html" title="trait actix_web_httpauth::headers::www_authenticate::Challenge">Challenge</a>> { /* fields omitted */ }</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Authentication error returned by authentication extractors.</p>
|
||||
<p>Different extractors may extend <code>AuthenticationError</code> implementation
|
||||
in order to provide access to inner challenge fields.</p>
|
||||
</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/actix_web_httpauth/extractors/bearer.rs.html#146-176" title="goto source code">[src]</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.AuthenticationError.html" title="struct actix_web_httpauth::extractors::AuthenticationError">AuthenticationError</a><<a class="struct" href="../headers/www_authenticate/bearer/struct.Bearer.html" title="struct actix_web_httpauth::headers::www_authenticate::bearer::Bearer">Bearer</a>></h3></div></summary><div class="docblock"><p>Extended error customization for HTTP <code>Bearer</code> auth.</p>
|
||||
</div><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.with_error" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/actix_web_httpauth/extractors/bearer.rs.html#151-155" title="goto source code">[src]</a></div><a href="#method.with_error" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.with_error" class="fnname">with_error</a>(self, kind: <a class="enum" href="bearer/enum.Error.html" title="enum actix_web_httpauth::extractors::bearer::Error">Error</a>) -> Self</h4></div></summary><div class="docblock"><p>Attach <code>Error</code> to the current Authentication error.</p>
|
||||
</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/actix_web_httpauth/extractors/bearer.rs.html#144-174" title="goto source code">[src]</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.AuthenticationError.html" title="struct actix_web_httpauth::extractors::AuthenticationError">AuthenticationError</a><<a class="struct" href="../headers/www_authenticate/bearer/struct.Bearer.html" title="struct actix_web_httpauth::headers::www_authenticate::bearer::Bearer">Bearer</a>></h3></div></summary><div class="docblock"><p>Extended error customization for HTTP <code>Bearer</code> auth.</p>
|
||||
</div><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.with_error" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/actix_web_httpauth/extractors/bearer.rs.html#149-153" title="goto source code">[src]</a></div><a href="#method.with_error" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.with_error" class="fnname">with_error</a>(self, kind: <a class="enum" href="bearer/enum.Error.html" title="enum actix_web_httpauth::extractors::bearer::Error">Error</a>) -> Self</h4></div></summary><div class="docblock"><p>Attach <code>Error</code> to the current Authentication error.</p>
|
||||
<p>Error status code will be changed to the one provided by the <code>kind</code>
|
||||
Error.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.with_error_description" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/actix_web_httpauth/extractors/bearer.rs.html#158-164" title="goto source code">[src]</a></div><a href="#method.with_error_description" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.with_error_description" class="fnname">with_error_description</a><T>(self, desc: T) -> Self <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="https://doc.rust-lang.org/nightly/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a><'static, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>>>, </span></h4></div></summary><div class="docblock"><p>Attach error description to the current Authentication error.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.with_error_uri" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/actix_web_httpauth/extractors/bearer.rs.html#169-175" title="goto source code">[src]</a></div><a href="#method.with_error_uri" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.with_error_uri" class="fnname">with_error_uri</a><T>(self, uri: T) -> Self <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="https://doc.rust-lang.org/nightly/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a><'static, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>>>, </span></h4></div></summary><div class="docblock"><p>Attach error URI to the current Authentication error.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.with_error_description" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/actix_web_httpauth/extractors/bearer.rs.html#156-162" title="goto source code">[src]</a></div><a href="#method.with_error_description" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.with_error_description" class="fnname">with_error_description</a><T>(self, desc: T) -> Self <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="https://doc.rust-lang.org/nightly/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a><'static, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>>>, </span></h4></div></summary><div class="docblock"><p>Attach error description to the current Authentication error.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.with_error_uri" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/actix_web_httpauth/extractors/bearer.rs.html#167-173" title="goto source code">[src]</a></div><a href="#method.with_error_uri" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.with_error_uri" class="fnname">with_error_uri</a><T>(self, uri: T) -> Self <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="https://doc.rust-lang.org/nightly/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a><'static, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>>>, </span></h4></div></summary><div class="docblock"><p>Attach error URI to the current Authentication error.</p>
|
||||
<p>It is up to implementor to provide properly formed absolute URI.</p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-1" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/actix_web_httpauth/extractors/errors.rs.html#20-43" title="goto source code">[src]</a></div><a href="#impl-1" class="anchor"></a><h3 class="code-header in-band">impl<C: <a class="trait" href="../headers/www_authenticate/trait.Challenge.html" title="trait actix_web_httpauth::headers::www_authenticate::Challenge">Challenge</a>> <a class="struct" href="struct.AuthenticationError.html" title="struct actix_web_httpauth::extractors::AuthenticationError">AuthenticationError</a><C></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.new" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/actix_web_httpauth/extractors/errors.rs.html#24-29" title="goto source code">[src]</a></div><a href="#method.new" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.new" class="fnname">new</a>(challenge: C) -> <a class="struct" href="struct.AuthenticationError.html" title="struct actix_web_httpauth::extractors::AuthenticationError">AuthenticationError</a><C></h4></div></summary><div class="docblock"><p>Creates new authentication error from the provided <code>challenge</code>.</p>
|
||||
<p>By default returned error will resolve into the <code>HTTP 401</code> status code.</p>
|
||||
|
Reference in New Issue
Block a user