Ajout du FR

Ajout du FR + correction du "functions.php"
This commit is contained in:
Gauvain Boiché
2020-03-30 14:52:34 +02:00
commit 5e4c5f9418
4541 changed files with 608941 additions and 0 deletions

View File

@@ -0,0 +1,60 @@
<?php
namespace OAuth\Common\Consumer;
/**
* Value object for the credentials of an OAuth service.
*/
class Credentials implements CredentialsInterface
{
/**
* @var string
*/
protected $consumerId;
/**
* @var string
*/
protected $consumerSecret;
/**
* @var string
*/
protected $callbackUrl;
/**
* @param string $consumerId
* @param string $consumerSecret
* @param string $callbackUrl
*/
public function __construct($consumerId, $consumerSecret, $callbackUrl)
{
$this->consumerId = $consumerId;
$this->consumerSecret = $consumerSecret;
$this->callbackUrl = $callbackUrl;
}
/**
* @return string
*/
public function getCallbackUrl()
{
return $this->callbackUrl;
}
/**
* @return string
*/
public function getConsumerId()
{
return $this->consumerId;
}
/**
* @return string
*/
public function getConsumerSecret()
{
return $this->consumerSecret;
}
}

View File

@@ -0,0 +1,24 @@
<?php
namespace OAuth\Common\Consumer;
/**
* Credentials Interface, credentials should implement this.
*/
interface CredentialsInterface
{
/**
* @return string
*/
public function getCallbackUrl();
/**
* @return string
*/
public function getConsumerId();
/**
* @return string
*/
public function getConsumerSecret();
}