mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-22 21:19:46 +05:30
Use native typehints
This commit is contained in:
parent
a1da9beb92
commit
577065c270
@ -9,17 +9,12 @@
|
||||
|
||||
namespace League\OAuth2\Server\Entities;
|
||||
|
||||
use Lcobucci\JWT\Token;
|
||||
use League\OAuth2\Server\CryptKey;
|
||||
|
||||
interface AccessTokenEntityInterface extends TokenInterface
|
||||
{
|
||||
/**
|
||||
* Generate a string representation from the access token
|
||||
*
|
||||
* @param CryptKey $privateKey
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function convertToAccessToken(CryptKey $privateKey);
|
||||
public function convertToAccessToken(CryptKey $privateKey): string;
|
||||
}
|
||||
|
@ -42,12 +42,8 @@ trait AccessTokenTrait
|
||||
|
||||
/**
|
||||
* Generate a string representation from the access token
|
||||
*
|
||||
* @param CryptKey $privateKey
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function convertToAccessToken(CryptKey $privateKey)
|
||||
public function convertToAccessToken(CryptKey $privateKey): string
|
||||
{
|
||||
return (string) $this->convertToJWT($privateKey);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user