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

Method set

crates/openshell-supervisor-network/src/token_grant.rs:116–126  ·  view source on GitHub ↗

Store a token with expiration time.

(&self, provider_name: String, access_token: String, expires_at_ms: i64)

Source from the content-addressed store, hash-verified

114
115 /// Store a token with expiration time.
116 fn set(&self, provider_name: String, access_token: String, expires_at_ms: i64) {
117 if let Ok(mut tokens) = self.tokens.write() {
118 tokens.insert(
119 provider_name,
120 CachedToken {
121 access_token,
122 expires_at_ms,
123 },
124 );
125 }
126 }
127}
128
129/// Obtain an `OAuth2` access token for a provider using JWT client assertion grant.

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected