| | |
| | | logger.debug("No Redirect URIs supplied"); |
| | | redirectUri = null; |
| | | } else { |
| | | URI originalRedirect = toUri(redirectUri); |
| | | if (originalRedirect == null) { |
| | | // invalid URI passed as redirectUri |
| | | return null; |
| | | } |
| | | |
| | | // Make the validations against fully decoded and normalized redirect-url. This also allows wildcards (case when client configured "Valid redirect-urls" contain wildcards) |
| | | String decodedRedirectUri = decodeRedirectUri(redirectUri); |
| | | URI decodedRedirect = toUri(decodedRedirectUri); |
| | |
| | | } |
| | | |
| | | // Return the original redirectUri, which can be partially encoded - for example http://localhost:8280/foo/bar%20bar%2092%2F72/3 . Just make sure it is normalized |
| | | URI redirect = toUri(redirectUri); |
| | | redirectUri = getNormalizedRedirectUri(redirect); |
| | | redirectUri = getNormalizedRedirectUri(originalRedirect); |
| | | |
| | | // We try to check validity also for original (encoded) redirectUrl, but just in case it exactly matches some "Valid Redirect URL" specified for client (not wildcards allowed) |
| | | if (valid == null) { |