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

Function provider_refresh_strategy

crates/openshell-cli/src/run.rs:5385–5396  ·  view source on GitHub ↗
(strategy: &str)

Source from the content-addressed store, hash-verified

5383}
5384
5385fn provider_refresh_strategy(strategy: &str) -> Result<ProviderCredentialRefreshStrategy> {
5386 match strategy {
5387 "oauth2_refresh_token" => Ok(ProviderCredentialRefreshStrategy::Oauth2RefreshToken),
5388 "oauth2_client_credentials" => {
5389 Ok(ProviderCredentialRefreshStrategy::Oauth2ClientCredentials)
5390 }
5391 "google_service_account_jwt" => {
5392 Ok(ProviderCredentialRefreshStrategy::GoogleServiceAccountJwt)
5393 }
5394 _ => Err(miette!("unsupported provider refresh strategy: {strategy}")),
5395 }
5396}
5397
5398fn print_refresh_status_row(status: &ProviderCredentialRefreshStatus) {
5399 println!("{}", refresh_status_row(status));

Callers 1

provider_refresh_configFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected