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

Function pair_with_ttl

crates/openshell-server/src/auth/sandbox_jwt.rs:263–279  ·  view source on GitHub ↗
(ttl: Duration)

Source from the content-addressed store, hash-verified

261 }
262
263 fn pair_with_ttl(ttl: Duration) -> (SandboxJwtIssuer, SandboxJwtAuthenticator) {
264 let mat = generate_jwt_key().expect("jwt key");
265 let issuer = SandboxJwtIssuer::from_pem(
266 mat.signing_key_pem.as_bytes(),
267 mat.kid.clone(),
268 "test-gateway",
269 ttl,
270 )
271 .unwrap();
272 let auth = SandboxJwtAuthenticator::from_pem(
273 mat.public_key_pem.as_bytes(),
274 mat.kid,
275 "test-gateway",
276 )
277 .unwrap();
278 (issuer, auth)
279 }
280
281 #[tokio::test]
282 async fn mint_and_validate_round_trip() {

Callers 2

pairFunction · 0.85

Calls 1

generate_jwt_keyFunction · 0.85

Tested by

no test coverage detected