Php 刷新令牌时自定义声明重置

Php 刷新令牌时自定义声明重置,php,laravel,jwt,dingo-api,Php,Laravel,Jwt,Dingo Api,我正在为jwt身份验证提供程序使用带有tymondesigns/jwt身份验证的dingo api。我为用户详细信息生成带有自定义声明的令牌。但是,在令牌刷新时,新令牌会重置声明。我求助于做: # Refresh and set token $this->auth->setToken($this->auth->parseToken()->refresh()); # Get user from token $token = $this->auth->fro

我正在为jwt身份验证提供程序使用带有tymondesigns/jwt身份验证的dingo api。我为用户详细信息生成带有自定义声明的令牌。但是,在令牌刷新时,新令牌会重置声明。我求助于做:

# Refresh and set token
$this->auth->setToken($this->auth->parseToken()->refresh());
# Get user from token
$token = $this->auth->fromUser($this->auth->toUser());
即使它有效,我也不认为我应该再打DB了