Skip to main content

token_value

Function token_value 

Source
fn token_value(stored: &[u8]) -> Option<(&UserId, &DeviceId, Option<u64>)>
Expand description

Reads a stored token value as a release build decodes it.

A value with no separator reads as an empty device id, an expiry field that is empty or begins with a separator reads as none, and anything past the eight bytes of an expiry is ignored. The expiry’s own bytes can hold a separator, so only the first two separators split.