pub struct BasicAuth { /* private fields */ }
Expand description
Authentication type that uses HTTP basic authentication.
This type always uses a pre-defined endpoint:
let auth = osauth::BasicAuth::new("https://cloud.local/baremetal",
"username", "password")
.expect("Invalid endpoint URL");
let session = osauth::Session::new(auth);
Implementations§
Trait Implementations§
Source§impl AuthType for BasicAuth
impl AuthType for BasicAuth
Source§fn authenticate<'life0, 'life1, 'async_trait>(
&'life0 self,
_client: &'life1 Client,
request: RequestBuilder,
) -> Pin<Box<dyn Future<Output = Result<RequestBuilder, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn authenticate<'life0, 'life1, 'async_trait>(
&'life0 self,
_client: &'life1 Client,
request: RequestBuilder,
) -> Pin<Box<dyn Future<Output = Result<RequestBuilder, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Authenticate a request.
Source§fn get_endpoint<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_client: &'life1 Client,
_service_type: &'life2 str,
_filters: &'life3 EndpointFilters,
) -> Pin<Box<dyn Future<Output = Result<Url, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn get_endpoint<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_client: &'life1 Client,
_service_type: &'life2 str,
_filters: &'life3 EndpointFilters,
) -> Pin<Box<dyn Future<Output = Result<Url, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Get a predefined endpoint for all service types
Auto Trait Implementations§
impl Freeze for BasicAuth
impl RefUnwindSafe for BasicAuth
impl Send for BasicAuth
impl Sync for BasicAuth
impl Unpin for BasicAuth
impl UnwindSafe for BasicAuth
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