1
0
Fork 0
pixelfed/app/Util/HTTPSignatures/Verifier.php

32 lines
573 B
PHP
Raw Normal View History

2018-11-19 03:33:10 +00:00
<?php
namespace App\Util\HttpSignatures;
use Psr\Http\Message\RequestInterface;
class Verifier
{
/** @var KeyStoreInterface */
private $keyStore;
/**
* @param KeyStoreInterface $keyStore
*/
public function __construct(KeyStoreInterface $keyStore)
{
$this->keyStore = $keyStore;
}
/**
* @param RequestInterface $message
*
* @return bool
*/
public function isValid($message)
{
$verification = new Verification($message, $this->keyStore);
return $verification->isValid();
}
}