diff --git a/util/sso/__init__.py b/util/sso/__init__.py index e0c0aa5..247a2cb 100644 --- a/util/sso/__init__.py +++ b/util/sso/__init__.py @@ -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, @@ -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",