-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJwtInterface.php
34 lines (23 loc) · 975 Bytes
/
JwtInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
declare(strict_types=1);
/**
* This file is part of MineAdmin.
*
* @link https://www.mineadmin.com
* @document https://doc.mineadmin.com
* @contact [email protected]
* @license https://github.com/mineadmin/MineAdmin/blob/master/LICENSE
*/
namespace Mine\Jwt;
use Lcobucci\JWT\UnencryptedToken;
interface JwtInterface
{
public function builderAccessToken(string $sub, ?\Closure $callable = null): UnencryptedToken;
public function builderRefreshToken(string $sub, ?\Closure $callable = null): UnencryptedToken;
public function parserAccessToken(string $accessToken): UnencryptedToken;
public function parserRefreshToken(string $refreshToken): UnencryptedToken;
public function addBlackList(UnencryptedToken $token): bool;
public function hasBlackList(UnencryptedToken $token): bool;
public function removeBlackList(UnencryptedToken $token): bool;
public function getConfig(string $key, mixed $default = null): mixed;
}