pub struct Renewal {
pub access_expires_at: Option<DateTime<Utc>>,
pub refresh_expires_at: Option<DateTime<Utc>>,
/* private fields */
}Expand description
What a token needs in order to replace itself without a person.
Fields§
§access_expires_at: Option<DateTime<Utc>>When the access token stops being accepted, if it was stated.
refresh_expires_at: Option<DateTime<Utc>>When the refresh token stops working. Past this, only an interactive sign-in helps – and it is six months from the last renewal, not from the first sign-in, so a host that runs at all never reaches it.
Implementations§
Source§impl Renewal
impl Renewal
Sourcepub fn refresh_token(&self) -> &SecretString
pub fn refresh_token(&self) -> &SecretString
The refresh token itself. Kept behind a method for the same reason the access token is: it is the more dangerous half of the pair, because it mints access tokens indefinitely.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Renewal
impl RefUnwindSafe for Renewal
impl Send for Renewal
impl Sync for Renewal
impl Unpin for Renewal
impl UnsafeUnpin for Renewal
impl UnwindSafe for Renewal
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more