[−][src]Struct osauth::BasicAuth
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
impl BasicAuth
[src]
pub fn new<U, S1, S2>(
endpoint: U,
username: S1,
password: S2
) -> Result<BasicAuth, Error> where
U: IntoUrl,
S1: Into<String>,
S2: Into<String>,
[src]
endpoint: U,
username: S1,
password: S2
) -> Result<BasicAuth, Error> where
U: IntoUrl,
S1: Into<String>,
S2: Into<String>,
Create a new HTTP basic authentication method using a fixed endpoint.
This endpoint will be returned in response to all get_endpoint
calls
of the AuthType trait.
pub fn new_with_client<U, S1, S2>(
endpoint: U,
client: Client,
username: S1,
password: S2
) -> Result<BasicAuth, Error> where
U: IntoUrl,
S1: Into<String>,
S2: Into<String>,
[src]
endpoint: U,
client: Client,
username: S1,
password: S2
) -> Result<BasicAuth, Error> where
U: IntoUrl,
S1: Into<String>,
S2: Into<String>,
Create a new HTTP basic authentication method using a fixed endpoint and an HTTP client.
Trait Implementations
impl AuthType for BasicAuth
[src]
fn request<'life0, 'async_trait>(
&'life0 self,
method: Method,
url: Url
) -> Pin<Box<dyn Future<Output = Result<RequestBuilder, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
method: Method,
url: Url
) -> Pin<Box<dyn Future<Output = Result<RequestBuilder, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Create a request.
fn get_endpoint<'life0, 'async_trait>(
&'life0 self,
_service_type: String,
_filters: EndpointFilters
) -> Pin<Box<dyn Future<Output = Result<Url, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
_service_type: String,
_filters: EndpointFilters
) -> Pin<Box<dyn Future<Output = Result<Url, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Get a predefined endpoint for all service types
fn refresh<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
This call does nothing for BasicAuth
.
fn default_filters(&self) -> Option<&EndpointFilters>
[src]
impl Clone for BasicAuth
[src]
impl Debug for BasicAuth
[src]
Auto Trait Implementations
impl !RefUnwindSafe for BasicAuth
impl Send for BasicAuth
impl Sync for BasicAuth
impl Unpin for BasicAuth
impl !UnwindSafe for BasicAuth
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,