fix wordpress indent
This commit is contained in:
parent
8141e3e460
commit
aa2b244bf3
@ -11,24 +11,35 @@ use OAuth\Common\Http\Exception\TokenResponseException;
|
|||||||
use OAuth\OAuth2\Service\Exception\InvalidAccessTypeException;
|
use OAuth\OAuth2\Service\Exception\InvalidAccessTypeException;
|
||||||
use OAuth\Common\Http\Uri\Uri;
|
use OAuth\Common\Http\Uri\Uri;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class For WordPress OAuth
|
||||||
|
*/
|
||||||
class WordPress extends AbstractService
|
class WordPress extends AbstractService
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
protected $accessType = 'online';
|
protected $accessType = 'online';
|
||||||
|
|
||||||
public function __construct(
|
/**
|
||||||
CredentialsInterface $credentials,
|
* Construct
|
||||||
ClientInterface $httpClient,
|
*
|
||||||
TokenStorageInterface $storage,
|
* @param CredentialsInterface $credentials credentials
|
||||||
$scopes = array(),
|
* @param ClientInterface $httpClient httpClient
|
||||||
UriInterface $baseApiUri = null
|
* @param TokenStorageInterface $storage storage
|
||||||
) {
|
* @param $scopes scope
|
||||||
|
* @param UriInterface|null $baseApiUri baseApiUri
|
||||||
|
* @throws Exception\InvalidScopeException
|
||||||
|
*/
|
||||||
|
public function __construct(CredentialsInterface $credentials, ClientInterface $httpClient, TokenStorageInterface $storage, $scopes = array(), UriInterface $baseApiUri = null)
|
||||||
|
{
|
||||||
parent::__construct($credentials, $httpClient, $storage, $scopes, $baseApiUri, true);
|
parent::__construct($credentials, $httpClient, $storage, $scopes, $baseApiUri, true);
|
||||||
|
|
||||||
if (null === $baseApiUri) {
|
if (null === $baseApiUri) {
|
||||||
$this->baseApiUri = new Uri('https://addresse_de_votre_site_wordpress');
|
$this->baseApiUri = new Uri('https://addresse_de_votre_site_wordpress');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
// LDR CHANGE Add approval_prompt to force the prompt if value is set to 'force' so it force return of a "refresh token" in addition to "standard token"
|
// LDR CHANGE Add approval_prompt to force the prompt if value is set to 'force' so it force return of a "refresh token" in addition to "standard token"
|
||||||
public $approvalPrompt='auto';
|
public $approvalPrompt='auto';
|
||||||
public function setApprouvalPrompt($prompt)
|
public function setApprouvalPrompt($prompt)
|
||||||
@ -41,7 +52,7 @@ class WordPress extends AbstractService
|
|||||||
}*/
|
}*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* @return Uri
|
||||||
*/
|
*/
|
||||||
public function getAuthorizationEndpoint()
|
public function getAuthorizationEndpoint()
|
||||||
{
|
{
|
||||||
@ -49,7 +60,7 @@ class WordPress extends AbstractService
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* @return Uri
|
||||||
*/
|
*/
|
||||||
public function getAccessTokenEndpoint()
|
public function getAccessTokenEndpoint()
|
||||||
{
|
{
|
||||||
@ -57,7 +68,7 @@ class WordPress extends AbstractService
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* @return int
|
||||||
*/
|
*/
|
||||||
protected function getAuthorizationMethod()
|
protected function getAuthorizationMethod()
|
||||||
{
|
{
|
||||||
@ -66,7 +77,9 @@ class WordPress extends AbstractService
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* @param $responseBody responseBody
|
||||||
|
* @return StdOAuth2Token
|
||||||
|
* @throws TokenResponseException
|
||||||
*/
|
*/
|
||||||
protected function parseAccessTokenResponse($responseBody)
|
protected function parseAccessTokenResponse($responseBody)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user