Skip to content

Commit

Permalink
Merge pull request #1 from tequilarapido/analysis-qomoMN
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
nbourguig authored Dec 9, 2016
2 parents c477435 + 78645e7 commit 7f42620
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
24 changes: 12 additions & 12 deletions src/OktaProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

namespace Tequilarapido\Okta;

use Laravel\Socialite\Two\AbstractProvider;
use Laravel\Socialite\Two\ProviderInterface;
use Laravel\Socialite\Two\User;
use Illuminate\Support\Arr;
use GuzzleHttp\ClientInterface;
use Laravel\Socialite\Two\User;
use Laravel\Socialite\Two\AbstractProvider;
use Laravel\Socialite\Two\ProviderInterface;

class OktaProvider extends AbstractProvider implements ProviderInterface
{
/**
* Scopes defintions
* Scopes defintions.
*
* @see http://developer.okta.com/docs/api/resources/oidc.html#scopes
*/
Expand All @@ -23,7 +23,7 @@ class OktaProvider extends AbstractProvider implements ProviderInterface
const SCOPE_OFFLINE_ACCESS = 'offline_access';

/**
* Okta organization url
* Okta organization url.
*
* @var string
*/
Expand All @@ -44,7 +44,7 @@ class OktaProvider extends AbstractProvider implements ProviderInterface
protected $scopeSeparator = ' ';

/**
* Set the okta base organization url
* Set the okta base organization url.
*
* @param string $oktaUrl
*/
Expand All @@ -58,15 +58,15 @@ public function setOktaUrl($oktaUrl)
*/
protected function getAuthUrl($state)
{
return $this->buildAuthUrlFromBase($this->oktaUrl . '/oauth2/v1/authorize', $state);
return $this->buildAuthUrlFromBase($this->oktaUrl.'/oauth2/v1/authorize', $state);
}

/**
* {@inheritdoc}
*/
protected function getTokenUrl()
{
return $this->oktaUrl . '/oauth2/v1/token';
return $this->oktaUrl.'/oauth2/v1/token';
}

/**
Expand All @@ -88,10 +88,10 @@ protected function getTokenFields($code)
*/
protected function getUserByToken($token)
{
$response = $this->getHttpClient()->get($this->oktaUrl . '/oauth2/v1/userinfo', [
$response = $this->getHttpClient()->get($this->oktaUrl.'/oauth2/v1/userinfo', [
'headers' => [
//'Accept' => 'application/json',
'Authorization' => 'Bearer ' . $token,
'Authorization' => 'Bearer '.$token,
],
]);

Expand Down Expand Up @@ -128,7 +128,7 @@ public function getAccessTokenResponse($code)

$options = [
'headers' => [
'Authorization' => 'Basic ' . base64_encode($this->clientId . ':' . $this->clientSecret)
'Authorization' => 'Basic '.base64_encode($this->clientId.':'.$this->clientSecret),
],
$postKey => $this->getTokenFields($code),
];
Expand All @@ -137,4 +137,4 @@ public function getAccessTokenResponse($code)

return json_decode($response->getBody(), true);
}
}
}
4 changes: 2 additions & 2 deletions src/SocialiteManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
class SocialiteManager extends \Laravel\Socialite\SocialiteManager
{
/**
* Creates Okta provider and bind it to Laravel Socialite
* Creates Okta provider and bind it to Laravel Socialite.
*
* @return \Laravel\Socialite\Two\AbstractProvider
*/
public function createOktaDriver()
{
$config = $this->app['config']['services.okta'];

$provider = $this->buildProvider(OktaProvider::class, $config);
$provider = $this->buildProvider(OktaProvider::class, $config);

$provider->setOktaUrl($config['url']);

Expand Down

0 comments on commit 7f42620

Please sign in to comment.