Which servers this grant is valid against. Explicit `--server-url` wins; otherwise the active profile, so the safe thing happens by default. `--any-server` is the deliberate opt-out, and an unresolvable profile is *not* silently treated as "any" — that would turn a misconfiguration into a grant broader than anyone asked for.
(&self)
| 292 | /// an unresolvable profile is *not* silently treated as "any" — that would |
| 293 | /// turn a misconfiguration into a grant broader than anyone asked for. |
| 294 | fn bound_servers(&self) -> CliResult<Vec<String>> { |
| 295 | if self.any_server { |
| 296 | return Ok(Vec::new()); |
| 297 | } |
| 298 | if !self.server_urls.is_empty() { |
| 299 | return Ok(self.server_urls.clone()); |
| 300 | } |
| 301 | |
| 302 | match crate::commands::client::apex_server_url(self.server.as_deref()) { |
| 303 | Ok(url) => Ok(vec![url]), |
| 304 | Err(_) => Err(CliError::InvalidArgument { |
| 305 | message: "No server configured, so this grant cannot be bound to one.\n \ |
| 306 | Pass --server-url <url>, or --any-server if you really mean a \ |
| 307 | grant valid against every deployment." |
| 308 | .to_string(), |
| 309 | }), |
| 310 | } |
| 311 | } |
| 312 | |
| 313 | /// Verify a self-signed request and turn it into a delegate identity. |
| 314 | /// |
no test coverage detected