pub enum RefreshTokenState {
Active,
Spent,
}Expand description
Whether a persisted refresh token is still redeemable.
Rotated tokens are RETAINED in the Spent state rather than deleted, exactly as consumed
authorization codes are (see crate::authorization::AuthorizationCodeState) and for exactly
the same reason: a token deleted on rotation makes a later presentation indistinguishable from
a typo, and the AS then answers the one signal it gets that a token leaked by disconnecting
whichever party redeemed second, which in practice is the honest one.
Variants§
Active
Live: redeemable exactly once.
Spent
Already rotated away. Presenting it is REUSE, which OAuth 2.1 draft section 6.1 and RFC 9700 section 4.14.2 treat as evidence of compromise: the whole family dies.
Trait Implementations§
Source§impl Clone for RefreshTokenState
impl Clone for RefreshTokenState
Source§fn clone(&self) -> RefreshTokenState
fn clone(&self) -> RefreshTokenState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RefreshTokenState
Source§impl Debug for RefreshTokenState
impl Debug for RefreshTokenState
Source§impl<'de> Deserialize<'de> for RefreshTokenState
impl<'de> Deserialize<'de> for RefreshTokenState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for RefreshTokenState
Source§impl PartialEq for RefreshTokenState
impl PartialEq for RefreshTokenState
Source§impl Serialize for RefreshTokenState
impl Serialize for RefreshTokenState
impl StructuralPartialEq for RefreshTokenState
Auto Trait Implementations§
impl Freeze for RefreshTokenState
impl RefUnwindSafe for RefreshTokenState
impl Send for RefreshTokenState
impl Sync for RefreshTokenState
impl Unpin for RefreshTokenState
impl UnsafeUnpin for RefreshTokenState
impl UnwindSafe for RefreshTokenState
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