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

Function extract_roles_groups_path

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

Source from the content-addressed store, hash-verified

441
442 #[test]
443 fn extract_roles_groups_path() {
444 // Okta style: groups claim
445 let json = serde_json::json!({
446 "sub": "user1",
447 "groups": ["everyone", "openshell-admin"]
448 });
449 let mut claims: OidcClaims = serde_json::from_value(json).unwrap();
450 claims.extract_roles("groups");
451 assert_eq!(claims.roles, vec!["everyone", "openshell-admin"]);
452 }
453
454 #[test]
455 fn extract_roles_missing_claim() {

Callers

nothing calls this directly

Calls 1

extract_rolesMethod · 0.80

Tested by

no test coverage detected