pub struct NoAuth { /* private fields */ }
Expand description
Authentication type that provides no authentication.
This type always uses a pre-defined endpoint and sends no authenticaiton information:
let auth = osauth::NoAuth::new("https://cloud.local/baremetal")
.expect("Invalid auth URL");
let session = osauth::Session::new(auth);
Implementations§
source§impl NoAuth
impl NoAuth
sourcepub fn new<U>(endpoint: U) -> Result<NoAuth, Error>where
U: AsRef<str>,
pub fn new<U>(endpoint: U) -> Result<NoAuth, Error>where U: AsRef<str>,
Create a new fake authentication method using a fixed endpoint.
This endpoint will be returned in response to all get_endpoint
calls
of the AuthType trait.
sourcepub fn new_without_endpoint() -> NoAuth
pub fn new_without_endpoint() -> NoAuth
Create a new fake authentication method without an endpoint.
All calls to get_endpoint
will fail. This option is only useful with endpoint overrides.
Trait Implementations§
source§impl AuthType for NoAuth
impl AuthType for NoAuth
source§fn authenticate<'life0, 'life1, 'async_trait>(
&'life0 self,
_client: &'life1 Client,
request: RequestBuilder
) -> Pin<Box<dyn Future<Output = Result<RequestBuilder, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn authenticate<'life0, 'life1, 'async_trait>( &'life0 self, _client: &'life1 Client, request: RequestBuilder ) -> Pin<Box<dyn Future<Output = Result<RequestBuilder, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Authenticate a request.
source§fn get_endpoint<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_client: &'life1 Client,
service_type: &'life2 str,
_filters: &'life3 EndpointFilters
) -> Pin<Box<dyn Future<Output = Result<Url, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn get_endpoint<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _client: &'life1 Client, service_type: &'life2 str, _filters: &'life3 EndpointFilters ) -> Pin<Box<dyn Future<Output = Result<Url, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,
Get a predefined endpoint for all service types
Auto Trait Implementations§
impl RefUnwindSafe for NoAuth
impl Send for NoAuth
impl Sync for NoAuth
impl Unpin for NoAuth
impl UnwindSafe for NoAuth
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more