Time remaining before expiry, or `None` if it never expires.
(&self)
| 716 | |
| 717 | /// Time remaining before expiry, or `None` if it never expires. |
| 718 | pub fn time_remaining(&self) -> Option<Duration> { |
| 719 | self.expires.map(|exp| exp - Utc::now()) |
| 720 | } |
| 721 | |
| 722 | /// Does the delegation authorize `permission` on `resource`? |
| 723 | /// |