public function hasValidSignature(Request $request)
    {
        $url = $request->url();

        $original = rtrim($url.'?'.Arr::query(
            Arr::except($request->query(), 'signature')
        ), '?');

        $expires = $request->query()['expires'] ?? null;

        $signature = \hash_hmac('sha256', $original, \call_user_func($this->keyResolver));

        return  \hash_equals($signature, (string) $request->query('signature', '')) &&
               ! ($expires && Carbon::now()->getTimestamp() > $expires);
    }
public function hasValidSignature(Request $request)
    {
        $url = $request->url();

        $original = rtrim($url.'?'.Arr::query(
            Arr::except($request->query(), 'signature')
        ), '?');

        $expires = $request->query()['expires'] ?? null;

        $signature = \hash_hmac('sha256', $original, \call_user_func($this->keyResolver));

        return  \hash_equals($signature, (string) $request->query('signature', '')) &&
               ! ($expires && Carbon::now()->getTimestamp() > $expires);
    }
public function hasValidSignature ( Request $ request ) { $ url = $ request -> url ( ) ; $ original = rtrim ( $ url . '?' . Arr :: query ( Arr :: except ( $ request -> query ( ) , 'signature' ) ) , '?' ) ; $ expires = $ request -> query ( ) [ 'expires' ] ?? null ; $ signature = \ hash_hmac ( 'sha256' , $ original , \ call_user_func ( $ this -> keyResolver ) ) ; return \ hash_equals ( $ signature , ( string ) $ request -> query ( 'signature' , '' ) ) && ! ( $ expires && Carbon :: now ( ) -> getTimestamp ( ) > $ expires ) ; }
Determine if the given request has a valid signature.

@param  \Illuminate\Http\Request  $request

@return bool
Determine if the given request has a valid signature .