mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-22 21:19:46 +05:30
Variable reference fixes
This commit is contained in:
parent
4abe7e7dda
commit
2b9d1c0e67
@ -422,13 +422,13 @@ class Server
|
|||||||
|
|
||||||
// Verify the authorization code matches the client_id and the
|
// Verify the authorization code matches the client_id and the
|
||||||
// request_uri
|
// request_uri
|
||||||
$sessionId = $this->db->validateAuthCode(
|
$session = $this->db->validateAuthCode(
|
||||||
$params['client_id'],
|
$params['client_id'],
|
||||||
$params['redirect_uri'],
|
$params['redirect_uri'],
|
||||||
$params['code']
|
$params['code']
|
||||||
);
|
);
|
||||||
|
|
||||||
if ( ! $sessionId) {
|
if ( ! $session) {
|
||||||
|
|
||||||
throw new OAuthServerClientException(sprintf($this->errors['invalid_grant'], 'code'), 9);
|
throw new OAuthServerClientException(sprintf($this->errors['invalid_grant'], 'code'), 9);
|
||||||
|
|
||||||
@ -442,7 +442,7 @@ class Server
|
|||||||
$accessTokenExpires = ($this->config['access_token_ttl'] === null) ? null : time() + $this->config['access_token_ttl'];
|
$accessTokenExpires = ($this->config['access_token_ttl'] === null) ? null : time() + $this->config['access_token_ttl'];
|
||||||
|
|
||||||
$this->db->updateSession(
|
$this->db->updateSession(
|
||||||
$sessionId,
|
$session['id'],
|
||||||
null,
|
null,
|
||||||
$accessToken,
|
$accessToken,
|
||||||
$accessTokenExpires,
|
$accessTokenExpires,
|
||||||
@ -451,7 +451,7 @@ class Server
|
|||||||
|
|
||||||
// Update the session's scopes to reference the access token
|
// Update the session's scopes to reference the access token
|
||||||
$this->db->updateSessionScopeAccessToken(
|
$this->db->updateSessionScopeAccessToken(
|
||||||
$sessionId,
|
$session['id'],
|
||||||
$accessToken
|
$accessToken
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user