pub struct Auth { /* private fields */ }
Implementations§
Source§impl Auth
impl Auth
pub fn new() -> Self
Sourcepub async fn authenticate_with_registry(
&self,
registry_url: &str,
repository: &str,
username: Option<&str>,
password: Option<&str>,
output: &Logger,
) -> Result<Option<String>>
pub async fn authenticate_with_registry( &self, registry_url: &str, repository: &str, username: Option<&str>, password: Option<&str>, output: &Logger, ) -> Result<Option<String>>
Perform Docker Registry API v2 authentication
Sourcepub async fn refresh_token(
&self,
token_info: &TokenInfo,
output: &Logger,
) -> Result<Option<String>>
pub async fn refresh_token( &self, token_info: &TokenInfo, output: &Logger, ) -> Result<Option<String>>
Refresh an expired token using stored credentials
Sourcepub async fn authenticate_with_token_info(
&self,
registry_url: &str,
repository: &str,
username: Option<&str>,
password: Option<&str>,
output: &Logger,
) -> Result<Option<TokenInfo>>
pub async fn authenticate_with_token_info( &self, registry_url: &str, repository: &str, username: Option<&str>, password: Option<&str>, output: &Logger, ) -> Result<Option<TokenInfo>>
Create a new TokenInfo with authentication
pub async fn login( &self, username: &str, _password: &str, output: &Logger, ) -> Result<Option<String>>
pub async fn get_repository_token( &self, _username: &str, _password: &str, repository: &str, output: &Logger, ) -> Result<Option<String>>
pub async fn get_token( &self, _registry: &str, _repo: &str, _username: Option<&str>, _password: Option<&str>, ) -> Result<String>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Auth
impl !RefUnwindSafe for Auth
impl Send for Auth
impl Sync for Auth
impl Unpin for Auth
impl !UnwindSafe for Auth
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