[][src]Struct fedora::openid::OpenIDClient

pub struct OpenIDClient { /* fields omitted */ }

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]

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

impl Debug for OpenIDClient[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err