Trait openstack::auth::AuthMethod [] [src]

pub trait AuthMethod: BoxedClone + Debug {
    fn get_endpoint(
        &self,
        service_type: String,
        endpoint_interface: Option<String>
    ) -> Result<Url>;
fn request(&self, method: Method, url: Url) -> Result<RequestBuilder>;
fn refresh(&mut self) -> Result<()>; fn default_endpoint_interface(&self) -> String { ... }
fn region(&self) -> Option<String> { ... } }

Trait for an authentication method.

An OpenStack authentication method 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 method should cache the token as long as it's valid.

Required Methods

Get a URL for the requested service.

Create an authenticated request.

Refresh the authentication (renew the token, etc).

Provided Methods

Default endpoint interface that is used when none is provided.

Region used with this authentication (if any).

Implementors