haskell - 安装 Obelisk-OAuth
问题描述
我正在尝试将 Obelisk-OAuth 添加到我的项目中:https ://github.com/obsidiansystems/obelisk-oauth
在这个指令中,我被卡住了:
Your backend route encoder should handle this case:
...
pathComponentEncoder $ \case
BackendRoute_OAuth -> PathSegment "oauth" oauthRouteEncoder
...
我在 Obelisk 项目中看到的唯一相似之处是:
backend :: Backend BackendRoute FrontendRoute
backend = Backend
{ _backend_run = \serve -> serve $ const $ return ()
, _backend_routeEncoder = fullRouteEncoder
}
来自后端.hs。
但这似乎不是正确的位置。
有没有人遇到过这个?我在哪里插入该pathComponentEncoder $ \case
表达式?
解决方案
fullRouteEncoder
中定义common/src/Common/Route.hs
。
所有路由都在“common”包中定义(在前端和后端之间共享)。这是您将注入 oauth 路由的地方。您在上面引用的文件是 Backend.hs,它使用fullRouteEncoder
common 定义。
推荐阅读
- android - 找不到接受参数和资源链接失败的视图的设置器
- snowflake-cloud-data-platform - 如何在雪花中实现 NUMBER(Oralce) 数据类型功能?
- java - Project Reactor 条件验证
- php - 基于变量的 Laravel 验证
- python - 在数据框中查找连续日期,按另一列值分组
- css - 如何在 CSS 中设置单选按钮的样式?
- javascript - 如何通过 id 或 class 区分 popover
- json - 尝试使用 firebase 获取我的颤振应用程序的请求并出现错误
- python - 如何在 Python 中以行列表的形式从图像中获取数据
- angular - Firebase将令牌传递给角度参数