Skip to main content

adopted

Function adopted 

Source
fn adopted(
    stored: &[u8],
    expires: u64,
) -> Result<Option<(&'_ UserId, &'_ DeviceId)>>
Expand description

Reads a stored token value, yielding its owner only when the row carries the expiry the adoption stamped.

A token this server issued carries an expiry it computed itself, or none, so a stored value equal to the origin’s is the adoption’s own write. A foreign row, and a token a later login replaced, read as something else and are left alone.