[][src]Trait osauth::AuthType

pub trait AuthType: Debug + Sync + Send {
#[must_use]    pub 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
;
#[must_use] pub 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
;
#[must_use] pub fn refresh<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; pub fn default_filters(&self) -> Option<&EndpointFilters> { ... } }

Trait for an authentication type.

An OpenStack authentication type is expected to be able to:

  1. get an authentication token to use when accessing services,
  2. 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]pub 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]

Get a URL for the requested service.

#[must_use]pub 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]

Create an authenticated request.

#[must_use]pub 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]

Refresh the authentication (renew the token, etc).

Loading content...

Provided methods

pub fn default_filters(&self) -> Option<&EndpointFilters>[src]

Default endpoint filters (if any).

Loading content...

Implementors

impl AuthType for Password[src]

pub fn default_filters(&self) -> Option<&EndpointFilters>[src]

Endpoint filters in use.

pub 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]

Create an authenticated request.

pub 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]

Get a URL for the requested service.

pub 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]

Refresh the cached token and service catalog.

impl AuthType for Token[src]

pub fn default_filters(&self) -> Option<&EndpointFilters>[src]

Endpoint filters in use.

pub 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]

Create an authenticated request.

pub 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]

Get a URL for the requested service.

pub 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]

Refresh the cached token and service catalog.

impl AuthType for BasicAuth[src]

pub 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]

Create a request.

pub 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]

Get a predefined endpoint for all service types

pub 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]

This call does nothing for BasicAuth.

impl AuthType for NoAuth[src]

pub 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]

Create a request.

pub 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]

Get a predefined endpoint for all service types

pub 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]

This call does nothing for NoAuth.

Loading content...