mirror of
https://github.com/elyby/accounts.git
synced 2024-10-31 16:03:01 +05:30
d37a865e14
Немного освобождены версии зависимостей
18 lines
428 B
PHP
18 lines
428 B
PHP
<?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::uuid4()->toString();
|
|
}
|
|
|
|
}
|