[−][src]Struct fedora::openid::OpenIDClient
The OpenIDClient
provides a way to authenticate with the OpenID
service that fedora provides - which is required for sending authenticated
requests to some of the fedora web services.
Methods
impl OpenIDClient
[src]
pub fn login(
&mut self,
username: String,
password: String
) -> Result<(), ClientError>
[src]
&mut self,
username: String,
password: String
) -> Result<(), ClientError>
This method does the hard work of doing the authentication dance by querying the OpenID service for the required arguments, traverses several redirects, and constructs and sends the resulting authentication request to the fedora OpenID endpoint.
It returns Ok(())
in case the requests worked as intended, and returns
an Err(String)
if something went wrong.
pub fn authenticated(&self) -> bool
[src]
This method can be used to determine whether a user has successfully authenticated with the fedora OpenID service yet.
pub fn session(&self) -> &Client
[src]
This method returns a reference to a reqwest::Client
instance that
can be used to send requests.
Trait Implementations
Auto Trait Implementations
impl Send for OpenIDClient
impl Sync for OpenIDClient
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Erased for T
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,