authentication - GoBuffalo 和 Authboss(身份验证系统)集成
问题描述
我正在尝试将authboss
(https://github.com/volatiletech/authboss)与GoBuffalo
(https://github.com/gobuffalo/buffalo)一起使用。
我还在学习围棋,我认为这是一个很好的练习。
我创建了一个新的 GoBuffalo 应用程序,你可以在这里找到它:https ://github.com/frederikhors/buffalo-authboss-sample
重现步骤
git clone https://github.com/frederikhors/buffalo-authboss-sample
cd
在项目根目录go get -u -v github.com/gobuffalo/buffalo/buffalo
go mod tidy
buffalo dev
如您所见,新的 buffalo 应用程序很小(所有功能都已注释)。
我从这个示例存储库中复制了一组非常小的说明:https ://github.com/volatiletech/authboss-sample
该应用程序启动,但我无法打开http://localhost:3000/auth/login(未找到 404 页面)。
使用app.Mount("/auth", http.StripPrefix("/auth", ab.Config.Core.Router))
创建路由,您可以在仪表板 ( http://localhost:3000/ ) 或下面的屏幕中看到。
布法罗路线:
GET /auth/{path:.+}/ authPath github.com/gobuffalo/buffalo.WrapHandler.func1
PUT /auth/{path:.+}/ authPath github.com/gobuffalo/buffalo.WrapHandler.func1
PATCH /auth/{path:.+}/ authPath github.com/gobuffalo/buffalo.WrapHandler.func1
HEAD /auth/{path:.+}/ authPath github.com/gobuffalo/buffalo.WrapHandler.func1
OPTIONS /auth/{path:.+}/ authPath github.com/gobuffalo/buffalo.WrapHandler.func1
DELETE /auth/{path:.+}/ authPath github.com/gobuffalo/buffalo.WrapHandler.func1
POST /auth/{path:.+}/ authPath github.com/gobuffalo/buffalo.WrapHandler.func1
我不明白如何告诉 Buffalo 为这些路线呈现 authboss 视图。
解决方案
推荐阅读
- angular - 如何使用猫鼬快递和角度从数组中删除特定对象
- vb.net - 如何在水晶报表的详细信息部分底部放置一条水平线
- html - 即使遵循模板,图像映射也不起作用
- excel - 如何根据另一个单元格中的文本对一个字母对应一个值的行求和?
- cassandra - 非主键列的 Cassandra IN 子句
- c# - 如何将列表类型对象的列名与 C# 中的字符串进行比较
- python - 如何根据列表元素限制加减法?
- angular - Angular 应用程序构建管道 - VSTS 中的持续集成
- reactjs - 如何从效果外部使用 React Hooks 设置状态?
- gembox-document - 使用 Gembox Document 合并图片大小