Merge branch 'dev'

This commit is contained in:
2025-07-15 14:49:47 +08:00

View File

@@ -19,7 +19,10 @@ class Auth
public function handle($request, \Closure $next) public function handle($request, \Closure $next)
{ {
try { try {
$oauth = new OAuth2(new OAuthStorage); $oauth = new OAuth2(new OAuthStorage, [
'access_token_lifetime' => env('OPENAPI.ACCESS_TOKEN_LIFETIME', 3600),
'refresh_token_lifetime' => env('OPENAPI.REFRESH_TOKEN_LIFETIME', 1209600),
]);
$token = $oauth->getBearerToken(); $token = $oauth->getBearerToken();
$oauth->verifyAccessToken($token); $oauth->verifyAccessToken($token);
} catch (OAuth2ServerException $e) { } catch (OAuth2ServerException $e) {