unilim-cas 1.0.1

A purrfect CAS authentication wrapper for Unilim.
Documentation
/// errors returned by the client.
#[derive(Debug, thiserror::Error)]
pub enum Error {
    /// the csrf token could not be retrieved from the cas portal.
    #[error("no cas token")]
    NoCasToken,

    /// transport failure, or a json payload that could not be deserialized.
    #[error(transparent)]
    Http(#[from] rikka::Error),

    /// a url could not be parsed.
    #[error(transparent)]
    Url(#[from] url::ParseError),

    /// a value could not be parsed, like a totp secret.
    #[error("{0}")]
    Parse(String),

    /// the server replied with an unexpected status or payload.
    #[error("{0}")]
    Api(String),
}

/// alias of [`std::result::Result`] with [`Error`] as the error type.
pub type Result<T> = std::result::Result<T, Error>;