-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ 增加OIDC登入功能 #2028
✨ 增加OIDC登入功能 #2028
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
非常感谢你的贡献, 但是这个配置方式好复杂, 你能否实现一个支持 自动发现的配置, 让管理员只填:
- discovery url
- client id + client secret
- kwargs (包括 scope 等)
这些需要的配置实际上都可以通过 requests 请求得到, 实现的难度应该不高
我个人也很期待这个功能, 内部 oidc 已经有了, 就等这个功能完成, 接入了 |
好的, 我加一下 |
除了oidc.auth.OIDCAuthenticationBackend, https://github.com/mozilla/mozilla-django-oidc/blob/main/mozilla_django_oidc/middleware.py 也要调用OIDC_OP_AUTHORIZATION_ENDPOINT, 所以那个requests 只能在settings.py 里面跑 |
等一下 #2030 这个merge , 需要把 CI 修好 |
lint 修一下哈, 你装一下 black 执行下就行了 |
完成, 謝謝了 |
看看测试错误, 关注一下哦 |
Codecov ReportBase: 75.08% // Head: 75.00% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #2028 +/- ##
==========================================
- Coverage 75.08% 75.00% -0.09%
==========================================
Files 102 102
Lines 14759 14779 +20
==========================================
+ Hits 11082 11085 +3
- Misses 3677 3694 +17
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
現在只有code coverage 沒過, 是不是不用管的? |
嗯嗯, 现在可以了 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
When will this feature be released? @LeoQuote |
@LeoQuote |
希望有个OIDC功能开启的配置手册说明,谢谢 |
有没有关闭OIDC_VERIFY_SSL 认证的参数呀 |
你好我想问下您配置oidc成功了吗,回调的uri应该填什么路径呢 |
这个pull request 增加了keycloak / oidc 登入选项, 基本上打开以下参数就可连结keycloak
ENABLE_OIDC="True"
OIDC_RP_ISSUER_URL="https://keycloak.example.com/realms/"
OIDC_RP_CLIENT_ID=""
OIDC_RP_CLIENT_SECRET=""