resolveRedirectUri static method

  1. @visibleForTesting
String resolveRedirectUri(
  1. Uri currentUri,
  2. Uri redirectUri
)

Implementation

@visibleForTesting
static String resolveRedirectUri(Uri currentUri, Uri redirectUri) {
  if (redirectUri.hasScheme) {
    /// This is a full URL which has to be redirected to as is.
    return redirectUri.toString();
  }

  /// This is relative with or without leading slash and is
  /// resolved against the URL of the original request.
  return currentUri.resolveUri(redirectUri).toString();
}