mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-11-01 16:33:07 +05:30
Merge pull request #801 from lucasantarella/master
Added ability to specify query delimiter character in the implicit grant
This commit is contained in:
commit
cc98b5ec16
@ -27,11 +27,18 @@ class ImplicitGrant extends AbstractAuthorizeGrant
|
|||||||
private $accessTokenTTL;
|
private $accessTokenTTL;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \DateInterval $accessTokenTTL
|
* @var string
|
||||||
*/
|
*/
|
||||||
public function __construct(\DateInterval $accessTokenTTL)
|
private $queryDelimiter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param \DateInterval $accessTokenTTL
|
||||||
|
* @param string $queryDelimiter
|
||||||
|
*/
|
||||||
|
public function __construct(\DateInterval $accessTokenTTL, $queryDelimiter = '#')
|
||||||
{
|
{
|
||||||
$this->accessTokenTTL = $accessTokenTTL;
|
$this->accessTokenTTL = $accessTokenTTL;
|
||||||
|
$this->queryDelimiter = $queryDelimiter;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -204,7 +211,7 @@ class ImplicitGrant extends AbstractAuthorizeGrant
|
|||||||
'expires_in' => $accessToken->getExpiryDateTime()->getTimestamp() - (new \DateTime())->getTimestamp(),
|
'expires_in' => $accessToken->getExpiryDateTime()->getTimestamp() - (new \DateTime())->getTimestamp(),
|
||||||
'state' => $authorizationRequest->getState(),
|
'state' => $authorizationRequest->getState(),
|
||||||
],
|
],
|
||||||
'#'
|
$this->queryDelimiter
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user