mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Фиксы после инспекции кода новым инспектором в PHPStorm
В некоторых формах отключена валидация при сохранении модели аккаунта
This commit is contained in:
@@ -9,7 +9,7 @@ class UserFriendlyRandomKey {
|
||||
$numChars = strlen($chars);
|
||||
$key = '';
|
||||
for ($i = 0; $i < $length; $i++) {
|
||||
$key .= substr($chars, rand(1, $numChars) - 1, 1);
|
||||
$key .= $chars[random_int(0, $numChars - 1)];
|
||||
}
|
||||
|
||||
return $key;
|
||||
|
||||
@@ -54,7 +54,7 @@ class AuthCodeStorage extends AbstractStorage implements AuthCodeInterface {
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function getScopes(OriginalAuthCodeEntity $token) {
|
||||
$result = (new Set($this->dataTable, $token->getId(), 'scopes'));
|
||||
$result = new Set($this->dataTable, $token->getId(), 'scopes');
|
||||
$response = [];
|
||||
foreach ($result as $scope) {
|
||||
// TODO: нужно проверить все выданные скоупы на их существование
|
||||
|
||||
@@ -2,10 +2,9 @@
|
||||
namespace common\components\oauth\Util\KeyAlgorithm;
|
||||
|
||||
use League\OAuth2\Server\Util\KeyAlgorithm\DefaultAlgorithm;
|
||||
use League\OAuth2\Server\Util\KeyAlgorithm\KeyAlgorithmInterface;
|
||||
use Ramsey\Uuid\Uuid;
|
||||
|
||||
class UuidAlgorithm extends DefaultAlgorithm implements KeyAlgorithmInterface {
|
||||
class UuidAlgorithm extends DefaultAlgorithm {
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
|
||||
Reference in New Issue
Block a user