Trait openstack::auth::AuthMethod
source · 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> { ... }
}
Expand description
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
sourcefn get_endpoint(
&self,
service_type: String,
endpoint_interface: Option<String>
) -> Result<Url>
fn get_endpoint(
&self,
service_type: String,
endpoint_interface: Option<String>
) -> Result<Url>
Get a URL for the requested service.
Provided Methods
sourcefn default_endpoint_interface(&self) -> String
fn default_endpoint_interface(&self) -> String
Default endpoint interface that is used when none is provided.
Trait Implementations
sourceimpl Clone for Box<dyn AuthMethod>
impl Clone for Box<dyn AuthMethod>
sourcefn clone(&self) -> Box<dyn AuthMethod>
fn clone(&self) -> Box<dyn AuthMethod>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more