You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
OAuth2测试使用了几天,因为本人水平很菜,在这里记录一下,也不知道对不对,如果做错了希望大佬指点一下。
组件默认提供了数据库表来存储客户端、令牌等,在实际项目中,有时需要自己加一些东西进去,比如我想在jwt中加入一些自定义的字段进去。
看了hyperf的官方文档以为可以通过class_map功能替换,实际测试发现不行,也可能可以是我的操作方式不对。
后来发现可以通过配置config/autoload/dependencies.php将组件在ConfigProvider.php默认的dependencies替换成自己的实现就可以了(AI查了一下说自定义的配置会覆盖组件提供的默认配置,实测发现可行)。
Beta Was this translation helpful? Give feedback.
All reactions