private function validateRedirectUri($inputUri, $registeredUriString)
    {
        if (!$inputUri || !$registeredUriString) {
            return false; // if either one is missing, assume INVALID
        }

        $registered_uris = explode(' ', $registeredUriString);
        foreach ($registered_uris as $registered_uri) {
            if ($this->config['require_exact_redirect_uri']) {
                // the input uri is validated against the registered uri using exact match
                if (strcmp($inputUri, $registered_uri) === 0) {
                    return true;
                }
            } else {
                // the input uri is validated against the registered uri using case-insensitive match of the initial string
                // i.e. additional query parameters may be applied
                if (strcasecmp(substr($inputUri, 0, strlen($registered_uri)), $registered_uri) === 0) {
                    return true;
                }
            }
        }
        return false;
    }
private function validateRedirectUri($inputUri, $registeredUriString)
    {
        if (!$inputUri || !$registeredUriString) {
            return false; // if either one is missing, assume INVALID
        }

        $registered_uris = explode(' ', $registeredUriString);
        foreach ($registered_uris as $registered_uri) {
            if ($this->config['require_exact_redirect_uri']) {
                // the input uri is validated against the registered uri using exact match
                if (strcmp($inputUri, $registered_uri) === 0) {
                    return true;
                }
            } else {
                // the input uri is validated against the registered uri using case-insensitive match of the initial string
                // i.e. additional query parameters may be applied
                if (strcasecmp(substr($inputUri, 0, strlen($registered_uri)), $registered_uri) === 0) {
                    return true;
                }
            }
        }
        return false;
    }
private function validateRedirectUri ( $ inputUri , $ registeredUriString ) { if ( ! $ inputUri || ! $ registeredUriString ) { return false ; // if either one is missing, assume INVALID } $ registered_uris = explode ( ' ' , $ registeredUriString ) ; foreach ( $ registered_uris as $ registered_uri ) { if ( $ this -> config [ 'require_exact_redirect_uri' ] ) { // the input uri is validated against the registered uri using exact match if ( strcmp ( $ inputUri , $ registered_uri ) === 0 ) { return true ; } } else { // the input uri is validated against the registered uri using case-insensitive match of the initial string // i.e. additional query parameters may be applied if ( strcasecmp ( substr ( $ inputUri , 0 , strlen ( $ registered_uri ) ) , $ registered_uri ) === 0 ) { return true ; } } } return false ; }
Internal method for validating redirect URI supplied

@param string $inputUri
The submitted URI to be validated
@param string $registeredUriString
The allowed URI(s) to validation against.  Can be a space-delimited string of URIs to
allow for multiple URIs

@link http://tools.ietf.org/html/rfc6749#section-3.1.2
Internal method for validating redirect URI supplied