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

Function extract_scopes_json_array

crates/openshell-server/src/auth/oidc.rs:474–482  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

472
473 #[test]
474 fn extract_scopes_json_array() {
475 let json = serde_json::json!({
476 "sub": "user1",
477 "scp": ["sandbox:read", "provider:read"]
478 });
479 let claims: OidcClaims = serde_json::from_value(json).unwrap();
480 let scopes = claims.extract_scopes("scp");
481 assert_eq!(scopes, vec!["sandbox:read", "provider:read"]);
482 }
483
484 #[test]
485 fn extract_scopes_filters_standard_oidc_scopes() {

Callers

nothing calls this directly

Calls 1

extract_scopesMethod · 0.80

Tested by

no test coverage detected