[−][src]Trait osauth::AuthType
Trait for an authentication method.
An OpenStack authentication method 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 method should cache the token as long as it's valid.
Required methods
fn get_endpoint<'auth>(
&'auth self,
service_type: String,
endpoint_interface: Option<String>
) -> Box<dyn Future<Item = Url, Error = Error> + 'auth>
&'auth self,
service_type: String,
endpoint_interface: Option<String>
) -> Box<dyn Future<Item = Url, Error = Error> + 'auth>
Get a URL for the requested service.
fn request<'auth>(
&'auth self,
method: Method,
url: Url
) -> Box<dyn Future<Item = RequestBuilder, Error = Error> + 'auth>
&'auth self,
method: Method,
url: Url
) -> Box<dyn Future<Item = RequestBuilder, Error = Error> + 'auth>
Create an authenticated request.
fn refresh<'auth>(
&'auth mut self
) -> Box<dyn Future<Item = (), Error = Error> + 'auth>
&'auth mut self
) -> Box<dyn Future<Item = (), Error = Error> + 'auth>
Refresh the authentication (renew the token, etc).
Provided methods
fn default_endpoint_interface(&self) -> String
Default endpoint interface that is used when none is provided.
fn region(&self) -> Option<String>
Region used with this authentication (if any).
Implementors
impl AuthType for Password
[src]
fn region(&self) -> Option<String>
[src]
Get region.
fn request<'auth>(
&'auth self,
method: Method,
url: Url
) -> Box<dyn Future<Item = RequestBuilder, Error = Error> + 'auth>
[src]
&'auth self,
method: Method,
url: Url
) -> Box<dyn Future<Item = RequestBuilder, Error = Error> + 'auth>
Create an authenticated request.
fn get_endpoint<'auth>(
&'auth self,
service_type: String,
endpoint_interface: Option<String>
) -> Box<dyn Future<Item = Url, Error = Error> + 'auth>
[src]
&'auth self,
service_type: String,
endpoint_interface: Option<String>
) -> Box<dyn Future<Item = Url, Error = Error> + 'auth>
Get a URL for the requested service.
fn refresh<'auth>(
&'auth mut self
) -> Box<dyn Future<Item = (), Error = Error> + 'auth>
[src]
&'auth mut self
) -> Box<dyn Future<Item = (), Error = Error> + 'auth>
fn default_endpoint_interface(&self) -> String
[src]
impl AuthType for NoAuth
[src]
fn request(
&self,
method: Method,
url: Url
) -> Box<dyn Future<Item = RequestBuilder, Error = Error>>
[src]
&self,
method: Method,
url: Url
) -> Box<dyn Future<Item = RequestBuilder, Error = Error>>
Create a request.
fn get_endpoint(
&self,
_service_type: String,
_endpoint_interface: Option<String>
) -> Box<dyn Future<Item = Url, Error = Error>>
[src]
&self,
_service_type: String,
_endpoint_interface: Option<String>
) -> Box<dyn Future<Item = Url, Error = Error>>
Get a predefined endpoint for all service types