[][src]Trait osauth::AuthType

pub trait AuthType: Debug + Sync + Send {
#[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
;
#[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
;
#[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
; 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]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, 

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, 

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, 

Refresh the authentication (renew the token, etc).

Loading content...

Provided methods

fn default_filters(&self) -> Option<&EndpointFilters>

Default endpoint filters (if any).

Loading content...

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]

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]

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]

Refresh the cached token and service catalog.

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]

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]

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]

This call does nothing for NoAuth.

Loading content...