adding app/library/OAuth/Adapter classes (interface and League adapter)
This commit is contained in:
parent
205b8477f2
commit
556a62b34b
2 changed files with 116 additions and 0 deletions
43
app/library/OAuth/Adapter/AdapterInterface.php
Normal file
43
app/library/OAuth/Adapter/AdapterInterface.php
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
|
||||
namespace Httpcb\OAuth\Adapter;
|
||||
|
||||
interface AdapterInterface
|
||||
{
|
||||
/**
|
||||
* Construct a adapter object.
|
||||
*
|
||||
* @param string $provider_name
|
||||
* @param array $options
|
||||
*/
|
||||
public function __construct($provider_name, $options);
|
||||
|
||||
/**
|
||||
* Get the provider name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getProviderName();
|
||||
|
||||
/**
|
||||
* Get the authorization url.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getAuthorizationUrl();
|
||||
|
||||
/**
|
||||
* Fetch the AccessToken using the temporary code returned from provider.
|
||||
*
|
||||
* @param $code
|
||||
* @return
|
||||
*/
|
||||
public function fetchAccessToken($code);
|
||||
|
||||
/**
|
||||
* Get resource data from provider.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getResourceData();
|
||||
}
|
||||
Reference in a new issue