pub struct WebAuth { /* private fields */ }Expand description
WebAuth is a middleware that checks if the request is authorized by calling remote API.
Implementations§
Source§impl WebAuth
impl WebAuth
Sourcepub fn with_api_base_url(self, api_base_url: &str) -> Self
pub fn with_api_base_url(self, api_base_url: &str) -> Self
Set the API base URL.
Sourcepub fn with_includes(self, includes: Vec<String>) -> Self
pub fn with_includes(self, includes: Vec<String>) -> Self
Add includes paths.
Sourcepub fn with_excludes(self, excludes: Vec<String>) -> Self
pub fn with_excludes(self, excludes: Vec<String>) -> Self
Add excludes paths.
pub fn into_layer(self) -> AsyncRequireAuthorizationLayer<Self>
Trait Implementations§
Source§impl AsyncAuthorizeRequest<Body> for WebAuth
impl AsyncAuthorizeRequest<Body> for WebAuth
Source§type RequestBody = Body
type RequestBody = Body
The type of request body returned by
authorize. Read moreSource§type ResponseBody = Body
type ResponseBody = Body
The body type used for responses to unauthorized requests.
Source§type Future = Pin<Box<dyn Future<Output = Result<Request<Body>, Response<<WebAuth as AsyncAuthorizeRequest<Body>>::ResponseBody>>> + Send>>
type Future = Pin<Box<dyn Future<Output = Result<Request<Body>, Response<<WebAuth as AsyncAuthorizeRequest<Body>>::ResponseBody>>> + Send>>
The Future type returned by
authorizeAuthorize the request. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for WebAuth
impl !UnwindSafe for WebAuth
impl Freeze for WebAuth
impl Send for WebAuth
impl Sync for WebAuth
impl Unpin for WebAuth
impl UnsafeUnpin for WebAuth
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more