We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e5020af commit e24e608Copy full SHA for e24e608
1 file changed
src/Service/User.php
@@ -44,9 +44,12 @@ protected function resolveConfig(): array
44
45
public function getClass(): string
46
{
47
- $store = $this->getStore();
48
- $class = $this->config->getClass();
49
- if (!$class) {
+ $token = $this->app->get('jwt')->getToken();
+
+ try {
50
+ $class = $token->getClaim('model', $this->config->getClass());
51
+ } catch (\OutOfBoundsException $e) {
52
+ $store = $this->getStore();
53
throw new JWTException("{$store}应用未配置用户模型文件");
54
}
55
0 commit comments