UrlUtils module
Functions
| get |
Returns URL hash as server auth code response object. |
| map |
Utility to create a URL from the params map |
| normalize |
Normalizes URLs for comparison by removing hash, canonicalizing, and ensuring consistent URL encoding in query parameters. This fixes redirect loops when URLs contain encoded characters like apostrophes (%27). |
| strip |
Parses hash string from given string. Returns empty string if no hash symbol is found. |
Function Details
getDeserializedResponse(string)
Returns URL hash as server auth code response object.
function getDeserializedResponse(responseString: string): AuthorizeResponse | null
Parameters
- responseString
-
string
Returns
AuthorizeResponse | null
mapToQueryString(Map<string, string>, boolean, StringDict)
Utility to create a URL from the params map
function mapToQueryString(parameters: Map<string, string>, encodeExtraParams?: boolean, extraQueryParameters?: StringDict): string
Parameters
- parameters
-
Map<string, string>
- encodeExtraParams
-
boolean
- extraQueryParameters
- StringDict
Returns
string
normalizeUrlForComparison(string)
Normalizes URLs for comparison by removing hash, canonicalizing, and ensuring consistent URL encoding in query parameters. This fixes redirect loops when URLs contain encoded characters like apostrophes (%27).
function normalizeUrlForComparison(url: string): string
Parameters
- url
-
string
URL to normalize
Returns
string
Normalized URL string for comparison
stripLeadingHashOrQuery(string)
Parses hash string from given string. Returns empty string if no hash symbol is found.
function stripLeadingHashOrQuery(responseString: string): string
Parameters
- responseString
-
string
Returns
string