Changeset View
Changeset View
Standalone View
Standalone View
services/identity/src/token.rs
Show All 32 Lines | AccessTokenData { | ||||
user_id, | user_id, | ||||
signing_public_key, | signing_public_key, | ||||
access_token: Alphanumeric.sample_string(rng, ACCESS_TOKEN_LENGTH), | access_token: Alphanumeric.sample_string(rng, ACCESS_TOKEN_LENGTH), | ||||
created: Utc::now(), | created: Utc::now(), | ||||
auth_type, | auth_type, | ||||
valid: true, | valid: true, | ||||
} | } | ||||
} | } | ||||
pub fn is_valid(&self) -> bool { | |||||
self.valid | |||||
} | |||||
} | } |