我是android开发的新手,我在阅读java中的getExternalStorageDirectory时遇到了一些问题,我已经阅读了https://developer.android.com/reference/android/os/Environment,但无法理解,有人可以帮我举例吗Java代码
我看过很多关于这个错误的帖子,但没有一个解决方案对我有用。
我正在使用 Passport 运行 Laravel,它在我的开发服务器上运行良好。正如预期的那样,当尝试检查用户是否在我的开发服务器上通过身份验证时,它返回捕获(在 axios 调用中):
开发服务器
"message":"Unauthenticated."
Run Code Online (Sandbox Code Playgroud)
但是,在我的生产服务器上运行相同的代码时,它返回捕获:
生产服务器:
"message": "SQLSTATE[42S22]: Column not found: 1054 Unknown column 'api_token'
in 'where clause' (SQL: select * from `users` where `api_token` = ...
Run Code Online (Sandbox Code Playgroud)
我已经运行了 Passport 迁移,并且在 config/auth.php 中将 ['guards']['api']['driver'] 设置为 Passport,并更新了显然为其他人解决了问题的配置缓存。
看起来身份验证需要使用护照迁移中的 oauth 表,但查询似乎正在查看用户表。
编辑:
我能够确定我的开发服务器使用RequestGuard该类来查找用户,而我的生产服务器使用TokenGuard该类来查找用户。