Skip to content

Commit

Permalink
add c3voc sso
Browse files Browse the repository at this point in the history
  • Loading branch information
Kunsi committed Dec 23, 2024
1 parent 7ebc23f commit 69d9af8
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions util/sso/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
from conf import CONFIG
from util.sso.c3voc import (
check_c3voc_allowed_login,
check_c3voc_is_admin,
check_c3voc_no_limit,
get_c3voc_userid,
get_c3voc_username,
)
from util.sso.github import (
check_github_allowed_login,
check_github_is_admin,
Expand All @@ -8,6 +15,20 @@
)

SSO_CONFIG = {
"c3voc": {
"display_name": "C3VOC",
"authorize_url": "https://sso.c3voc.de/application/o/authorize/",
"token_url": "https://sso.c3voc.de/application/o/token/",
"scopes": ["openid", "profile", "groups"],
"userinfo_url": "https://sso.c3voc.de/application/o/userinfo/",
"functions": {
"is_admin": check_c3voc_is_admin,
"login_allowed": check_c3voc_allowed_login,
"no_limit": check_c3voc_no_limit,
"userid": get_c3voc_userid,
"username": get_c3voc_username,
},
},
"github": {
"display_name": "GitHub",
"authorize_url": "https://github.com/login/oauth/authorize",
Expand Down

0 comments on commit 69d9af8

Please sign in to comment.