pub struct NoAuthProvider;
Implementations§
Source§impl NoAuthProvider
impl NoAuthProvider
pub fn new(_no_config: ()) -> AuthResult<Self>
Trait Implementations§
Source§impl AuthProvider for NoAuthProvider
Used as fallback to avoid compile error when no backend is configured
impl AuthProvider for NoAuthProvider
Used as fallback to avoid compile error when no backend is configured
type Config = ()
fn healthcheck<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn register<'life0, 'life1, 'async_trait>(
&'life0 self,
_username: &'life1 str,
) -> Pin<Box<dyn Future<Output = AuthResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn register<'life0, 'life1, 'async_trait>(
&'life0 self,
_username: &'life1 str,
) -> Pin<Box<dyn Future<Output = AuthResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Register a new user, returning a token if successful.
Source§fn list_owners<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_token: &'life1 str,
_crate_name: &'life2 str,
) -> Pin<Box<dyn Future<Output = AuthResult<Vec<ListedOwner>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn list_owners<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_token: &'life1 str,
_crate_name: &'life2 str,
) -> Pin<Box<dyn Future<Output = AuthResult<Vec<ListedOwner>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
List the owners of a crate.
Source§fn add_owners<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
_token: &'life1 str,
_users: &'life2 [&'life3 str],
_crate_name: &'life4 str,
) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn add_owners<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
_token: &'life1 str,
_users: &'life2 [&'life3 str],
_crate_name: &'life4 str,
) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Add a new owner to a crate.
Source§fn remove_owners<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
_token: &'life1 str,
_users: &'life2 [&'life3 str],
_crate_name: &'life4 str,
) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn remove_owners<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
_token: &'life1 str,
_users: &'life2 [&'life3 str],
_crate_name: &'life4 str,
) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Remove an owner from a crate.
Source§fn publish<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_token: &'life1 str,
_crate_name: &'life2 str,
) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn publish<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_token: &'life1 str,
_crate_name: &'life2 str,
) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Verify that a user has permission to publish new versions of a crate. Read more
Source§fn auth_yank<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_token: &'life1 str,
_crate_name: &'life2 str,
) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn auth_yank<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_token: &'life1 str,
_crate_name: &'life2 str,
) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Verify that a user has permission to yank or unyank versions of a crate.
Source§fn auth_index_fetch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_token: &'life1 str,
_crate_name: &'life2 str,
) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn auth_index_fetch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_token: &'life1 str,
_crate_name: &'life2 str,
) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Verify that a user is allowed to look at the index entry for a given crate. Read more
Source§fn auth_crate_download<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_token: &'life1 str,
_crate_name: &'life2 str,
) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn auth_crate_download<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_token: &'life1 str,
_crate_name: &'life2 str,
) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Verify that a user is allowed to download a given crate. Read more
Source§fn auth_view_full_index<'life0, 'life1, 'async_trait>(
&'life0 self,
_token: &'life1 str,
) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn auth_view_full_index<'life0, 'life1, 'async_trait>(
&'life0 self,
_token: &'life1 str,
) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Verify that a user is allowed to view the full index. Read more
Source§fn auth_config<'life0, 'life1, 'async_trait>(
&'life0 self,
token: &'life1 str,
) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn auth_config<'life0, 'life1, 'async_trait>(
&'life0 self,
token: &'life1 str,
) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch of config.json. Called only if the server is configured to do so.
fn token_from_headers<'h>( &self, headers: &'h HeaderMap, ) -> Result<Option<&'h str>, StatusCode>
Auto Trait Implementations§
impl Freeze for NoAuthProvider
impl RefUnwindSafe for NoAuthProvider
impl Send for NoAuthProvider
impl Sync for NoAuthProvider
impl Unpin for NoAuthProvider
impl UnwindSafe for NoAuthProvider
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