pub struct Authorization { /* private fields */ }Expand description
A successful authorization: the request it was granted for, and for how long.
Only Verifier::authorize creates it, so holding one proves that this
exact request was checked; credentials must be derived from it alone.
Implementations§
Source§impl Authorization
impl Authorization
Sourcepub fn request(&self) -> &AccessRequest
pub fn request(&self) -> &AccessRequest
The request that was authorized.
Sourcepub fn revocation_ids(&self) -> &[String]
pub fn revocation_ids(&self) -> &[String]
Revocation identifiers of the token’s blocks, in order, the authority block first.
Sourcepub fn token_id(&self) -> &str
pub fn token_id(&self) -> &str
Revocation identifier of the token’s last block, which names the exact token presented (its ancestors have the earlier ones). Logged by the services and used as certificate key ID.
Sourcepub fn valid_from(&self) -> u64
pub fn valid_from(&self) -> u64
Start of the validity window: the request time, in seconds since the Unix epoch.
Sourcepub fn valid_until(&self) -> u64
pub fn valid_until(&self) -> u64
End of the validity window (exclusive), in seconds since the Unix
epoch: the token allows the request at every second from
Self::valid_from up to, not including, this one.