MCPcopy Create free account
hub / github.com/aws/amazon-q-developer-cli / is_expired

Function is_expired

crates/chat-cli/src/auth/builder_id.rs:82–85  ·  view source on GitHub ↗

Indicates if an expiration time has passed, there is a small 1 min window that is removed so the token will not expire in transit

(expiration_time: &OffsetDateTime)

Source from the content-addressed store, hash-verified

80/// Indicates if an expiration time has passed, there is a small 1 min window that is removed
81/// so the token will not expire in transit
82fn is_expired(expiration_time: &OffsetDateTime) -> bool {
83 let now = time::OffsetDateTime::now_utc();
84 &(now + time::Duration::minutes(1)) > expiration_time
85}
86
87pub(crate) fn oidc_url(region: &Region) -> String {
88 format!("https://oidc.{region}.amazonaws.com")

Callers 2

is_expiredMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected