mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-05-31 14:12:07 +05:30
Fixes and tests
This commit is contained in:
@@ -20,11 +20,11 @@ interface MacTokenInterface extends StorageInterface
|
||||
{
|
||||
/**
|
||||
* Create a MAC key linked to an access token
|
||||
* @param string $macKey
|
||||
* @param \League\OAuth2\Server\Entity\AccessTokenEntity $accessTokenEntity
|
||||
* @param string $macKey
|
||||
* @param string $accessToken
|
||||
* @return void
|
||||
*/
|
||||
public function create($macKey, AccessTokenEntity $accessTokenEntity);
|
||||
public function create($macKey, $accessToken);
|
||||
|
||||
/**
|
||||
* Get a MAC key by access token
|
||||
|
||||
@@ -63,9 +63,11 @@ class MAC extends AbstractTokenType implements TokenTypeInterface
|
||||
|
||||
preg_match_all('/([a-zA-Z]*)="([\w=]*)"/', $param, $matches);
|
||||
|
||||
// @codeCoverageIgnoreStart
|
||||
if (count($matches) !== 3) {
|
||||
return;
|
||||
}
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
||||
$key = reset($matches[1]);
|
||||
$value = trim(reset($matches[2]));
|
||||
@@ -74,7 +76,7 @@ class MAC extends AbstractTokenType implements TokenTypeInterface
|
||||
return;
|
||||
}
|
||||
|
||||
$params->add($key, $value);
|
||||
$params->set($key, $value);
|
||||
}, $paramsRaw);
|
||||
|
||||
// Validate parameters
|
||||
|
||||
Reference in New Issue
Block a user