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

Function build_scopes

crates/openshell-cli/src/oidc_auth.rs:77–87  ·  view source on GitHub ↗
(scopes: Option<&str>)

Source from the content-addressed store, hash-verified

75}
76
77fn build_scopes(scopes: Option<&str>) -> Vec<Scope> {
78 let mut result = vec![Scope::new("openid".to_string())];
79 if let Some(s) = scopes {
80 for scope in s.split_whitespace() {
81 if scope != "openid" {
82 result.push(Scope::new(scope.to_string()));
83 }
84 }
85 }
86 result
87}
88
89fn build_ci_scopes(scopes: Option<&str>) -> Vec<Scope> {
90 let Some(s) = scopes else {

Calls 1

pushMethod · 0.80