* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace HWI\Bundle\OAuthBundle\OAuth; /** * Interface for classes providing a request tokens storage. * * The storage is needed because the OAuth1.0a authentication flow requires * requests to be signed with the same values in consecutive requests. * * Additionally we require this to provide CSRF protection for all resource * owners. * * @author Alexander * @author Francisco Facioni * @author Joseph Bielawski */ interface RequestDataStorageInterface { /** * Fetch a request data from the storage. * * @param string $key * @param string $type */ public function fetch(ResourceOwnerInterface $resourceOwner, $key, $type = 'token'); /** * Save a request data to the storage. * * @param array|string|object $value * @param string $type */ public function save(ResourceOwnerInterface $resourceOwner, $value, $type = 'token'); }