Archived
1
0
Fork 0

adding app/library/OAuth/Adapter classes (interface and League adapter)

This commit is contained in:
Henrik Hautakoski 2018-04-06 11:36:29 +02:00
parent 205b8477f2
commit 556a62b34b
2 changed files with 116 additions and 0 deletions

View 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();
}