mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-23 05:29:52 +05:30
Removed dead code
This commit is contained in:
parent
e1ef133067
commit
f5c3ba0b24
@ -322,20 +322,6 @@ class AuthCodeGrant extends AbstractAuthorizeGrant
|
|||||||
'code_challenge_method ' => $authorizationRequest->getCodeChallengeMethod(),
|
'code_challenge_method ' => $authorizationRequest->getCodeChallengeMethod(),
|
||||||
];
|
];
|
||||||
|
|
||||||
if ($this->encryptionKey === null) {
|
|
||||||
// Add padding to vary the length of the payload
|
|
||||||
$payload['_padding'] = base64_encode(random_bytes(mt_rand(8, 256)));
|
|
||||||
// Shuffle the payload so that the structure is no longer know and obvious
|
|
||||||
$keys = array_keys($payload);
|
|
||||||
shuffle($keys);
|
|
||||||
$shuffledPayload = [];
|
|
||||||
foreach ($keys as $key) {
|
|
||||||
$shuffledPayload[$key] = $payload[$key];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$shuffledPayload = $payload;
|
|
||||||
}
|
|
||||||
|
|
||||||
$response = new RedirectResponse();
|
$response = new RedirectResponse();
|
||||||
$response->setRedirectUri(
|
$response->setRedirectUri(
|
||||||
$this->makeRedirectUri(
|
$this->makeRedirectUri(
|
||||||
@ -343,7 +329,7 @@ class AuthCodeGrant extends AbstractAuthorizeGrant
|
|||||||
[
|
[
|
||||||
'code' => $this->encrypt(
|
'code' => $this->encrypt(
|
||||||
json_encode(
|
json_encode(
|
||||||
$shuffledPayload
|
$payload
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
'state' => $authorizationRequest->getState(),
|
'state' => $authorizationRequest->getState(),
|
||||||
|
Loading…
Reference in New Issue
Block a user