Expose TokenInfo fields publically

For easier debugging, and for implementing custom storage solutions which might not use serde.
This commit is contained in:
Daniel Rodgers-Pryor
2021-03-25 21:11:26 +11:00
parent 98ee92f8b2
commit fbf6c17916

View File

@@ -58,11 +58,11 @@ impl From<TokenInfo> for AccessToken {
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct TokenInfo {
/// used when authenticating calls to oauth2 enabled services.
pub(crate) access_token: String,
pub access_token: String,
/// used to refresh an expired access_token.
pub(crate) refresh_token: Option<String>,
pub refresh_token: Option<String>,
/// The time when the token expires.
pub(crate) expires_at: Option<DateTime<Utc>>,
pub expires_at: Option<DateTime<Utc>>,
}
impl TokenInfo {