forked from hwi/HWIOAuthBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRequestDataStorageInterface.php
More file actions
48 lines (44 loc) · 1.37 KB
/
RequestDataStorageInterface.php
File metadata and controls
48 lines (44 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
/*
* This file is part of the HWIOAuthBundle package.
*
* (c) Hardware Info <[email protected]>
*
* 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 <[email protected]>
* @author Francisco Facioni <[email protected]>
* @author Joseph Bielawski <[email protected]>
*/
interface RequestDataStorageInterface
{
/**
* Fetch a request data from the storage.
*
* @param ResourceOwnerInterface $resourceOwner
* @param string $key
* @param string $type
*
* @return array
*/
public function fetch(ResourceOwnerInterface $resourceOwner, $key, $type = 'token');
/**
* Save a request data to the storage.
*
* @param ResourceOwnerInterface $resourceOwner
* @param array|string $value
* @param string $type
*/
public function save(ResourceOwnerInterface $resourceOwner, $value, $type = 'token');
}