Генерируемые AccessTokens заменены на UUID значения

This commit is contained in:
ErickSkrauch committed 2016-06-18 16:38:15 +03:00
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();
}
}