Skip to content

Commit

Permalink
Hotfix to remove invalid NS and use the default generator for authori…
Browse files Browse the repository at this point in the history
…sation codes
  • Loading branch information
jonoradich committed Feb 24, 2016
1 parent a69a797 commit 3c7f688
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 18 deletions.
1 change: 0 additions & 1 deletion src/League/OAuth2/Server/Authorization.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
namespace League\OAuth2\Server;

use League\OAuth2\Server\Util\Request;
use League\OAuth2\Server\Util\SecureKey;
use League\OAuth2\Server\Storage\SessionInterface;
use League\OAuth2\Server\Storage\ClientInterface;
use League\OAuth2\Server\Storage\ScopeInterface;
Expand Down
6 changes: 4 additions & 2 deletions src/League/OAuth2/Server/Grant/AuthCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use League\OAuth2\Server\Authorization;
use League\OAuth2\Server\Exception;
use League\OAuth2\Server\Exception\ClientException;
use League\OAuth2\Server\Util\DefaultGenerator;

/**
* Auth code grant class
Expand Down Expand Up @@ -149,8 +150,9 @@ public function checkAuthoriseParams($inputParams = array())
*/
public function newAuthoriseRequest($type, $typeId, $authParams = array())
{
// Generate an auth code
$authCode = $this->getTokenGenerator()->generate();
// Generate an auth code.
// We want to use the default generator for this
$authCode = (new DefaultGenerator())->generate();

// Remove any old sessions the user might have
$this->authServer->getStorage('session')->deleteSession($authParams['client_id'], $type, $typeId);
Expand Down
5 changes: 0 additions & 5 deletions src/League/OAuth2/Server/Grant/ClientCredentials.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,8 @@

namespace League\OAuth2\Server\Grant;

use League\OAuth2\Server\Request;
use League\OAuth2\Server\Authorization;
use League\OAuth2\Server\Exception;
use League\OAuth2\Server\Util\SecureKey;
use League\OAuth2\Server\Storage\SessionInterface;
use League\OAuth2\Server\Storage\ClientInterface;
use League\OAuth2\Server\Storage\ScopeInterface;

/**
* Client credentials grant class
Expand Down
5 changes: 0 additions & 5 deletions src/League/OAuth2/Server/Grant/Password.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,8 @@

namespace League\OAuth2\Server\Grant;

use League\OAuth2\Server\Request;
use League\OAuth2\Server\Authorization;
use League\OAuth2\Server\Exception;
use League\OAuth2\Server\Util\SecureKey;
use League\OAuth2\Server\Storage\SessionInterface;
use League\OAuth2\Server\Storage\ClientInterface;
use League\OAuth2\Server\Storage\ScopeInterface;

/**
* Password grant class
Expand Down
5 changes: 0 additions & 5 deletions src/League/OAuth2/Server/Grant/RefreshToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,8 @@

namespace League\OAuth2\Server\Grant;

use League\OAuth2\Server\Request;
use League\OAuth2\Server\Authorization;
use League\OAuth2\Server\Exception;
use League\OAuth2\Server\Util\SecureKey;
use League\OAuth2\Server\Storage\SessionInterface;
use League\OAuth2\Server\Storage\ClientInterface;
use League\OAuth2\Server\Storage\ScopeInterface;

/**
* Referesh token grant
Expand Down

0 comments on commit 3c7f688

Please sign in to comment.