oauth2-server/src/Storage/MacTokenInterface.php

36 lines
827 B
PHP
Raw Normal View History

2014-12-27 21:06:20 +00:00
<?php
/**
* OAuth 2.0 MAC Token Interface
*
* @package league/oauth2-server
* @author Alex Bilbie <hello@alexbilbie.com>
* @copyright Copyright (c) Alex Bilbie
* @license http://mit-license.org/
* @link https://github.com/thephpleague/oauth2-server
*/
namespace League\OAuth2\Server\Storage;
2014-12-27 21:38:01 +00:00
use League\OAuth2\Server\Entity\AccessTokenEntity;
2014-12-27 21:06:20 +00:00
/**
* MacTokenInterface
*/
interface MacTokenInterface extends StorageInterface
{
/**
* Create a MAC key linked to an access token
2014-12-27 22:26:31 +00:00
* @param string $macKey
* @param string $accessToken
2014-12-27 21:38:01 +00:00
* @return void
2014-12-27 21:06:20 +00:00
*/
2014-12-27 22:26:31 +00:00
public function create($macKey, $accessToken);
2014-12-27 21:06:20 +00:00
/**
* Get a MAC key by access token
2014-12-27 21:38:01 +00:00
* @param string $accessToken
2014-12-27 21:06:20 +00:00
* @return string
*/
public function getByAccessToken($accessToken);
2014-12-27 21:38:01 +00:00
}