[−][src]Trait osauth::AuthType
Trait for an authentication type.
An OpenStack authentication type is expected to be able to:
- get an authentication token to use when accessing services,
- get an endpoint URL for the given service type.
An authentication type should cache the token as long as it's valid.
Required methods
#[must_use]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,
&'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 URL for the requested service.
#[must_use]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,
&'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 an authenticated request.
#[must_use]fn refresh<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Refresh the authentication (renew the token, etc).
Provided methods
fn default_filters(&self) -> Option<&EndpointFilters>
Default endpoint filters (if any).
Implementors
impl AuthType for Password
[src]
fn default_filters(&self) -> Option<&EndpointFilters>
[src]
Endpoint filters in use.
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 an authenticated 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 URL for the requested service.
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,
Refresh the cached token and service catalog.
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
.
impl AuthType for NoAuth
[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 NoAuth
.