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

Function is_idc_user

crates/chat-cli/src/auth/builder_id.rs:666–675  ·  view source on GitHub ↗
(database: &Database)

Source from the content-addressed store, hash-verified

664}
665
666pub async fn is_idc_user(database: &Database) -> Result<bool> {
667 if cfg!(test) {
668 return Ok(false);
669 }
670 if let Ok(Some(token)) = BuilderIdToken::load(database, None).await {
671 Ok(token.token_type() == TokenType::IamIdentityCenter)
672 } else {
673 Err(eyre!("No auth token found - is the user signed in?"))
674 }
675}
676
677#[cfg(test)]
678mod tests {

Callers 2

get_subscription_statusFunction · 0.85
executeMethod · 0.85

Calls 1

token_typeMethod · 0.80

Tested by

no test coverage detected