Ability to specify query delimiter, such as ? instead of the hard-coded #

This commit is contained in:
Luca Santarella 2017-10-25 18:30:17 -04:00
parent 63861704b6
commit 825017f27e
No known key found for this signature in database
GPG Key ID: 298DBB36CA788B93

View File

@ -27,11 +27,18 @@ class ImplicitGrant extends AbstractAuthorizeGrant
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->queryDelimiter = $queryDelimiter;
}
/**
@ -204,7 +211,7 @@ class ImplicitGrant extends AbstractAuthorizeGrant
'expires_in' => $accessToken->getExpiryDateTime()->getTimestamp() - (new \DateTime())->getTimestamp(),
'state' => $authorizationRequest->getState(),
],
'#'
$this->queryDelimiter
)
);