使用 Django 实现单点登录 (SSO) [英] Implementing Single Sign On (SSO) using Django
问题描述
我想使用 Django 为我们当前使用的多个应用程序实现单点登录 (SSO).我如何使用 Django 实现这一点?
I would like to use Django for implementing Single Sign On (SSO) for multiple applications that we currently use. How can I implement this using Django?
推荐答案
我们正在使用 OpenAM.http://forgerock.com/openam.html
We're using OpenAM. http://forgerock.com/openam.html
OpenAM Cookie 表示用户已通过身份验证.
The OpenAM Cookie means that the user is authenticated.
用于此的身份验证后端非常简单.不到 50 行代码.
An authentication backend for this is pretty simple. Under 50 lines of code.
https://docs.djangoproject.com/en/3.1/topics/auth/customizing/#other-authentication-sources
我们编写了一些代码,向 OpenAM 服务器发出 RESTful 请求以获取用户、组和角色信息.然后我们使用角色来确定用户的授权.
We wrote a little bit of code that makes a RESTful request to the OpenAM server to get the user, group and role information. We then use the roles to determine the user's authorizations.
这篇关于使用 Django 实现单点登录 (SSO)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!