MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / issue

Function issue

atomic-remote/src/auth/delegation.rs:333–341  ·  view source on GitHub ↗
(f: &Fixture, scope: DelegationScope, expires_in: Duration)

Source from the content-addressed store, hash-verified

331 }
332
333 fn issue(f: &Fixture, scope: DelegationScope, expires_in: Duration) -> String {
334 let terms = Delegation::new(&f.human, &f.agent, scope).expires_in(expires_in);
335 let doc = cert::mint(&f.human, &f.human_key, &terms);
336 let id = terms.id.to_base32();
337 f.store
338 .save_delegation(&id, &serde_json::to_string_pretty(&doc).unwrap())
339 .unwrap();
340 id
341 }
342
343 fn scope_for(server: &str) -> DelegationScope {
344 DelegationScope::builder()

Calls 5

mintFunction · 0.85
expires_inMethod · 0.80
save_delegationMethod · 0.80
to_base32Method · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected