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

Method allows_server

atomic-identity/src/delegation.rs:337–345  ·  view source on GitHub ↗

Check if this scope is valid against a server URL. Comparison ignores a trailing slash and is case-insensitive on the host, so `https://Atomic.Storage/` and `https://atomic.storage` are the same server. Unlike the other dimensions this is an exact match, not a glob: a wildcard server would defeat the point of binding a certificate to the deployment it was issued for.

(&self, server_url: &str)

Source from the content-addressed store, hash-verified

335 /// a wildcard server would defeat the point of binding a certificate to
336 /// the deployment it was issued for.
337 pub fn allows_server(&self, server_url: &str) -> bool {
338 if self.servers.is_empty() {
339 return true;
340 }
341 let wanted = normalize_server_url(server_url);
342 self.servers
343 .iter()
344 .any(|s| normalize_server_url(s) == wanted)
345 }
346
347 /// Check if this scope allows access to a workspace.
348 pub fn allows_workspace(&self, workspace: &str) -> bool {

Callers 1

allowsMethod · 0.80

Calls 3

normalize_server_urlFunction · 0.85
is_emptyMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected