* RFC 8414 §3.3 / RFC 9728 §3.3 identifier comparison. Roundtrip through URL * to apply RFC 3986 §6.2.2 syntax-based normalization (lowercases scheme+host, * drops default port), then strip trailing slash.
(url: string)
| 59 | * drops default port), then strip trailing slash. |
| 60 | */ |
| 61 | function normalizeUrl(url: string): string { |
| 62 | try { |
| 63 | return new URL(url).href.replace(/\/$/, '') |
| 64 | } catch { |
| 65 | return url.replace(/\/$/, '') |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | /** |
| 70 | * Thrown by requestJwtAuthorizationGrant when the IdP token-exchange leg |
no outgoing calls
no test coverage detected