mirror of
https://github.com/elyby/accounts.git
synced 2024-11-15 17:56:30 +05:30
17 lines
341 B
PHP
17 lines
341 B
PHP
<?php
|
|
namespace api\components\OAuth2\Utils\KeyAlgorithm;
|
|
|
|
use League\OAuth2\Server\Util\KeyAlgorithm\KeyAlgorithmInterface;
|
|
use Ramsey\Uuid\Uuid;
|
|
|
|
class UuidAlgorithm implements KeyAlgorithmInterface {
|
|
|
|
/**
|
|
* @inheritdoc
|
|
*/
|
|
public function generate($len = 40) : string {
|
|
return Uuid::uuid4()->toString();
|
|
}
|
|
|
|
}
|