The `aud` for a server URL: scheme and host (and port), no trailing slash, lowercased — so `https://Atomic.Storage/` and `https://atomic.storage` are the same audience.
(server: &str)
| 202 | /// slash, lowercased — so `https://Atomic.Storage/` and |
| 203 | /// `https://atomic.storage` are the same audience. |
| 204 | pub fn audience(server: &str) -> String { |
| 205 | server.trim().trim_end_matches('/').to_ascii_lowercase() |
| 206 | } |
| 207 | |
| 208 | #[cfg(test)] |
| 209 | mod tests { |
no outgoing calls