在 Django 中实现用户特定密码过期(例如,每 90 天为部分客户重置一次)

发布于 2025-01-17 00:36:26 字数 412 浏览 1 评论 0原文

我正在构建的 Django 应用程序需要接受来自不同用户组的不同安全策略。其中一项策略是为不同的用户提供可定制的密码过期规则。

我研究了 django-allauth 和其他常见的身份验证包,如果您希望对所有用户一视同仁,它们都有很好的解决方案。

我发现实现某种基于用户的系统的一个包是 django-user-accounts。描述如下:https://django-user-accounts.readthedocs。 io/en/latest/commands.html

但是,我想要一个更干净的实现,而不是必须为每个用户运行命令,有什么建议吗?

The Django app I'm building will need to accept different security policies from different User Groups. One such policy is having a customizable password-expiry rule for different users.

I've looked at django-allauth and other common authentication packages and they all have great solutions if you're looking to treat all users the same.

The one package I've found that implements some sort of user-based system is django-user-accounts. Here's the description: https://django-user-accounts.readthedocs.io/en/latest/commands.html

However, I'd like a cleaner implementation than having to run a command for each user, any suggestions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文