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

Function user

crates/openshell-server/src/auth/guard.rs:102–112  ·  view source on GitHub ↗
(subject: &str)

Source from the content-addressed store, hash-verified

100 use crate::auth::principal::{SandboxIdentitySource, SandboxPrincipal, UserPrincipal};
101
102 fn user(subject: &str) -> Principal {
103 Principal::User(UserPrincipal {
104 identity: Identity {
105 subject: subject.to_string(),
106 display_name: None,
107 roles: vec![],
108 scopes: vec![],
109 provider: IdentityProvider::Oidc,
110 },
111 })
112 }
113
114 fn sandbox(id: &str) -> Principal {
115 Principal::Sandbox(SandboxPrincipal {

Callers 1

Calls

no outgoing calls

Tested by 1