<!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="Identity policy."><metaname="keywords"content="rust, rustlang, rust-lang, IdentityPolicy"><title>IdentityPolicy in actix_identity - 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"type="text/css"href="../normalize.css"><linkrel="stylesheet"type="text/css"href="../rustdoc.css"id="mainThemeStyle"><linkrel="stylesheet"type="text/css"href="../ayu.css"disabled><linkrel="stylesheet"type="text/css"href="../dark.css"disabled><linkrel="stylesheet"type="text/css"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 trait"><!--[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="../actix_identity/index.html"><divclass="logo-container"><imgclass="rust-logo"src="../rust-logo.svg"alt="logo"></div>
</a><h2class="location"><ahref="#">IdentityPolicy</a></h2><divclass="sidebar-elems"><section><divclass="block"><h3class="sidebar-title"><ahref="#required-associated-types">Required Associated Types</a></h3><ul><li><ahref="#associatedtype.Future">Future</a></li><li><ahref="#associatedtype.ResponseFuture">ResponseFuture</a></li></ul></div><divclass="block"><h3class="sidebar-title"><ahref="#required-methods">Required Methods</a></h3><ul><li><ahref="#tymethod.from_request">from_request</a></li><li><ahref="#tymethod.to_response">to_response</a></li></ul></div><divclass="block"><h3class="sidebar-title"><ahref="#implementors">Implementors</a></h3></div></section><h2class="location"><ahref="index.html">In actix_identity</a></h2></div></nav><main><divclass="width-limiter"><divclass="sub-container"><aclass="sub-logo-container"href="../actix_identity/index.html"><imgclass="rust-logo"src="../rust-logo.svg"alt="logo"></a><navclass="sub"><formclass="search-form"><divclass="search-container"><span></span><inputclass="search-input"name="search"autocomplete="off"spellcheck="false"placeholder="Click or press ‘S’ to search, ‘?’ for more options…"type="search"><divid="help-button"title="help"tabindex="-1"><buttontype="button">?</button></div><divid="settings-menu"tabindex="-1">
</div></details><detailsclass="rustdoc-toggle"open><summary><divid="associatedtype.ResponseFuture"class="method has-srclink"><divclass="rightside"><aclass="srclink"href="../src/actix_identity/lib.rs.html#76">source</a></div><h4class="code-header">type <ahref="#associatedtype.ResponseFuture"class="associatedtype">ResponseFuture</a>: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html"title="trait core::future::future::Future">Future</a><Output = Result<<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, Error>></h4></div></summary><divclass="docblock"><p>The return type of the middleware</p>
</div></details></div><h2id="required-methods"class="small-section-header">Required Methods<ahref="#required-methods"class="anchor"></a></h2><divclass="methods"><detailsclass="rustdoc-toggle"open><summary><divid="tymethod.from_request"class="method has-srclink"><divclass="rightside"><aclass="srclink"href="../src/actix_identity/lib.rs.html#80">source</a></div><h4class="code-header">fn <ahref="#tymethod.from_request"class="fnname">from_request</a>(&self, req: &mut ServiceRequest) -> Self::<aclass="associatedtype"href="trait.IdentityPolicy.html#associatedtype.Future"title="type actix_identity::IdentityPolicy::Future">Future</a></h4></div></summary><divclass="docblock"><p>Parse the session from request and load data from a service identity.</p>