public function validateRequestParameters($request, $amz_client_id) {
        $errors        = array();
        $state         = $request->getParam('state', false);
        $redirect_uri  = $request->getParam('redirect_uri', false);
        $client_id     = $request->getParam('client_id', false);
        $scope         = $request->getParam('scope', false);
        $response_type = $request->getParam('response_type', false);

        if($state === false) {
            $errors[] = 'state';
        }

        if($redirect_uri === false) {
            $errors[] = 'redirect_uri';
        }

        if($client_id != $amz_client_id) {
            $errors[] = 'client_id';
        }

        if($response_type != 'token') {
            $errors[] = 'response_type';
        }

        if(count($errors)) {
            throw new InvalidArgumentException('Missing or incorrect parameters: ' . implode(', ', $errors));
        } else {
            return [
                'state'         => $state,
                'redirect_uri'  => $redirect_uri,
                'client_id'     => $client_id,
                'scope'         => $scope,
                'response_type' => $response_type,
            ];
        }
    }