Authboss with Database

huangapple go评论77阅读模式
英文:

Authboss with Database

问题

我几周前刚开始学习Go语言,我想尝试为一个Web服务器实现一种身份验证系统。我找到了authboss,它似乎是一个完美的解决方案,但我不知道如何将其与传统数据库集成。它似乎只是将所有数据存储在自己的内存中,如果服务器崩溃或需要重新启动,那将是一场噩梦。有人有什么想法、思路或建议吗?

英文:

I just started learning Go a couple weeks ago, and I want to try and implement a kind of authentication system for a web server. Now, I found authboss which seems like a perfect solution except I don't understand how to integrate it with a traditional database. It seems like it just stores everything in its own memory which is a nightmare if the server crashes or needs to be restarted. That having been said, does anyone have any ideas, thoughts, or recommendations?

答案1

得分: 2

  1. 要使用带有数据库后端的authboss身份验证,您需要编写一个“存储器”实现。目前没有很多现成的数据库存储器可用(至少我没有找到)。

  2. 使用数据库后端的示例身份验证实现:

根据GitHub上的星标数量,authboss是最受欢迎的。

当然,还有商业选项,例如https://auth0.com/blog/authentication-in-golang/

可以在这里找到可用的身份验证库和框架的长列表:https://github.com/avelino/awesome-go#authentication-and-oauth

英文:
  1. To use authboss authentication with a database backend you need to write a 'storer' implementation. There aren't very many database storers readily available (at least I haven't been able to find them).

  2. Example authentication implementations with a database backend:

Based on the number of stars on github, authboss is the most popular.

Of course, there are also commercial options, e.g. https://auth0.com/blog/authentication-in-golang/

A long list of available authentication libraries and frameworks can be found here: https://github.com/avelino/awesome-go#authentication-and-oauth

huangapple
  • 本文由 发表于 2016年2月10日 09:57:28
  • 转载请务必保留本文链接:https://go.coder-hub.com/35305598.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定