unilim-cas 1.0.1

A purrfect CAS authentication wrapper for Unilim.
Documentation
use serde::{Deserialize, Serialize};
#[cfg(all(target_arch = "wasm32", feature = "npm"))]
use tsify_next::Tsify;

/// oauth2 tokens returned by `/oauth2/token`.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[cfg_attr(
    all(target_arch = "wasm32", feature = "npm"),
    derive(Tsify),
    tsify(into_wasm_abi, from_wasm_abi)
)]
pub struct Tokens {
    /// bearer token used to authenticate api requests.
    pub access_token: String,
    /// lifetime of the access token in seconds.
    pub expires_in: i64,
    /// openid connect identity token, a jwt.
    pub id_token: String,
    /// token used to obtain a new access token once expired.
    pub refresh_token: String,
    /// always `Bearer`.
    pub token_type: String,
}