php - 使用 laravel/passport 时密文太短
问题描述
任何人都可以帮助解决我在设置 laravel/passport 时遇到的问题吗?
我目前已经让授予客户访问用户数据的权限进行了排序,并将 auth_codes 存储在数据库中。
但是,当去 POST http://my-app.test/oauth/token检索访问令牌时,我得到以下响应。
{
"error": "invalid_request",
"error_description": "The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed.",
"hint": "Cannot decrypt the authorization code",
"message": "The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed."
}
我通过以下参数发送
grant_type:authorization_code
client_id:3
client_secret:TYSRJyZAGeSAnzFYyYKAp5F15C4EJiea4V5oamm2
redirect_ui:http://my-app.test/callback
code:5f2d0685414689cc322d10e5ada221e020d00036b1f9fe4154e5578511ed2a51373aa187142a96f2
稍微挖掘一下护照,我发现 defuse/php-encryption 包抛出以下错误:
密文太短
这可能是相关的吗?如果是,我应该怎么做才能解决这个问题?我尝试过使用钠/mcrypt php 扩展。
解决方案
推荐阅读
- javascript - 如何从已完成的 Javascript 事件中触发 CSS 的更改?
- java - 连接到 AWS DocumentDB 时出现 com.mongodb.CommandFailureException
- laravel-5 - Laravel 在数据库查询中合并计数
- python - dockerfile 安装 mysql 并在 ubuntu 镜像中运行脚本
- javascript - 在为 gRPC 流在服务器端调用 .end() 之前,如何在客户端接收数据
- c# - c# WPF 如何在加载 xaml 窗口时显示我的进度条?
- vue.js - 如何在 vuetify 中使用多个日期选择器模式?
- iis - IIS Web API 连接被重置
- image - Xamarin 表单:ImageLoaderSourceHandler:无法检索图像或图像数据无效:
- java - 我的代码没有错误但给我异常缺少返回语句?