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

Function remove_edge_token

crates/openshell-bootstrap/src/edge_token.rs:72–85  ·  view source on GitHub ↗

Remove a stored edge authentication token.

(gateway_name: &str)

Source from the content-addressed store, hash-verified

70
71/// Remove a stored edge authentication token.
72pub fn remove_edge_token(gateway_name: &str) -> Result<()> {
73 // Remove both new and legacy paths.
74 for path in [
75 edge_token_path(gateway_name)?,
76 legacy_token_path(gateway_name)?,
77 ] {
78 if path.exists() {
79 std::fs::remove_file(&path)
80 .into_diagnostic()
81 .wrap_err_with(|| format!("failed to remove {}", path.display()))?;
82 }
83 }
84 Ok(())
85}
86
87#[cfg(test)]
88mod tests {

Callers 4

gateway_logoutFunction · 0.85

Calls 3

edge_token_pathFunction · 0.85
legacy_token_pathFunction · 0.85
existsMethod · 0.80