diff --git a/System/Jwt/ASE.php b/System/Jwt/JWTConstant.php similarity index 98% rename from System/Jwt/ASE.php rename to System/Jwt/JWTConstant.php index d5af8d0f..97fabba1 100644 --- a/System/Jwt/ASE.php +++ b/System/Jwt/JWTConstant.php @@ -2,7 +2,7 @@ namespace Kiri\Jwt; -class ASE +class JWTConstant { const AES_128_ECB = 'aes-128-ecb'; diff --git a/System/Jwt/Jwt.php b/System/Jwt/Jwt.php index 26b5a584..e43e189b 100644 --- a/System/Jwt/Jwt.php +++ b/System/Jwt/Jwt.php @@ -46,7 +46,7 @@ class Jwt extends Component $jwt = Config::get('jwt', []); if ($jwt) { $this->setScene($jwt['scene'] ?? 'application'); - $this->setEncrypt($jwt['encrypt'] ?? ASE::AES_128_ECB); + $this->setEncrypt($jwt['encrypt'] ?? JWTConstant::AES_128_ECB); $this->setKey($jwt['key'] ?? get_called_class()); $defaultIv = openssl_random_pseudo_bytes(openssl_cipher_iv_length($this->encrypt));