MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / oauth2_token_url

Function oauth2_token_url

crates/openshell-server/src/provider_refresh.rs:641–653  ·  view source on GitHub ↗
(state: &StoredProviderCredentialRefreshState)

Source from the content-addressed store, hash-verified

639}
640
641fn oauth2_token_url(state: &StoredProviderCredentialRefreshState) -> Result<String, Status> {
642 if let Some(tenant_id) = material_value(&state.material, &["tenant_id"]) {
643 return Ok(format!(
644 "https://login.microsoftonline.com/{tenant_id}/oauth2/v2.0/token"
645 ));
646 }
647 if !state.token_url.trim().is_empty() {
648 return Ok(state.token_url.clone());
649 }
650 Err(Status::invalid_argument(
651 "oauth2_client_credentials requires token_url or tenant_id material",
652 ))
653}
654
655fn google_token_url(state: &StoredProviderCredentialRefreshState) -> String {
656 if state.token_url.trim().is_empty() {

Callers 2

Calls 2

material_valueFunction · 0.85
is_emptyMethod · 0.45

Tested by

no test coverage detected