PayPal\Auth\Oauth\OAuthServer::check_signature PHP Method

check_signature() private method

all-in-one function to check the signature on a request should guess the signature method appropriately
private check_signature ( $request, $consumer, $token )
    private function check_signature($request, $consumer, $token)
    {
        // this should probably be in a different method
        $timestamp = $request instanceof OAuthRequest ? $request->get_parameter('oauth_timestamp') : null;
        $nonce = $request instanceof OAuthRequest ? $request->get_parameter('oauth_nonce') : null;
        $this->check_timestamp($timestamp);
        $this->check_nonce($consumer, $token, $nonce, $timestamp);
        $signature_method = $this->get_signature_method($request);
        $signature = $request->get_parameter('oauth_signature');
        $valid_sig = $signature_method->check_signature($request, $consumer, $token, $signature);
        if (!$valid_sig) {
            throw new OAuthException("Invalid signature");
        }
    }