pub struct StaticAuthProvider { /* private fields */ }Expand description
Auth provider that always returns the same static auth header.
Implementations§
Trait Implementations§
Source§impl AuthProvider for StaticAuthProvider
impl AuthProvider for StaticAuthProvider
Source§fn auth_header_for<'a>(
&'a self,
_user_id: &'a str,
_tenant_id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, Error>> + Send + 'a>>
fn auth_header_for<'a>( &'a self, _user_id: &'a str, _tenant_id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<Option<String>, Error>> + Send + 'a>>
Return the Authorization header value for the given user/tenant context.
Returns
None if no auth is needed.Source§fn auth_header_for_resource<'a>(
&'a self,
user_id: &'a str,
tenant_id: &'a str,
_resource: Option<&'a str>,
_scopes: Option<&'a [String]>,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, Error>> + Send + 'a>>
fn auth_header_for_resource<'a>( &'a self, user_id: &'a str, tenant_id: &'a str, _resource: Option<&'a str>, _scopes: Option<&'a [String]>, ) -> Pin<Box<dyn Future<Output = Result<Option<String>, Error>> + Send + 'a>>
Return an Authorization header scoped to a specific resource and OAuth scopes. Read more
Auto Trait Implementations§
impl Freeze for StaticAuthProvider
impl RefUnwindSafe for StaticAuthProvider
impl Send for StaticAuthProvider
impl Sync for StaticAuthProvider
impl Unpin for StaticAuthProvider
impl UnsafeUnpin for StaticAuthProvider
impl UnwindSafe for StaticAuthProvider
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