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

Function user_principal

crates/openshell-server/src/auth/authenticator.rs:140–150  ·  view source on GitHub ↗
(subject: &str)

Source from the content-addressed store, hash-verified

138 use crate::auth::principal::UserPrincipal;
139
140 fn user_principal(subject: &str) -> Principal {
141 Principal::User(UserPrincipal {
142 identity: Identity {
143 subject: subject.to_string(),
144 display_name: None,
145 roles: vec![],
146 scopes: vec![],
147 provider: IdentityProvider::Oidc,
148 },
149 })
150 }
151
152 #[tokio::test]
153 async fn chain_returns_first_match() {

Callers 3

Calls

no outgoing calls

Tested by

no test coverage detected