mirror of
https://github.com/elyby/accounts.git
synced 2026-11-19 14:13:22 +05:30
Генерируемые AccessTokens заменены на UUID значения
This commit is contained in:
1 parent
7ea7c5245f
commit
eb1a3703cf
3 files changed
+27
-5
No files matched your search
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
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 {
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function generate($len = 40) : string {
|
||||
return Uuid::uuid5(Uuid::NAMESPACE_DNS, parent::generate($len))->toString();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user