feat(api): cas is compatible with casdoor

feat(api): cas is compatible with casdoor
This commit is contained in:
pycook
2023-12-11 20:58:18 +08:00
committed by GitHub
parent a1a6b11072
commit 4b133c56fd
3 changed files with 25 additions and 5 deletions

View File

@@ -70,11 +70,17 @@ ONCE = {
# # SSO
CAS_SERVER = "http://sso.xxx.com"
CAS_VALIDATE_SERVER = "http://sso.xxx.com"
CAS_LOGIN_ROUTE = "/cas/login"
CAS_LOGOUT_ROUTE = "/cas/logout"
CAS_VALIDATE_ROUTE = "/cas/serviceValidate"
CAS_LOGIN_ROUTE = "/cas/built-in/cas/login"
CAS_LOGOUT_ROUTE = "/cas/built-in/cas/logout"
CAS_VALIDATE_ROUTE = "/cas/built-in/cas/serviceValidate"
CAS_AFTER_LOGIN = "/"
DEFAULT_SERVICE = "http://127.0.0.1:8000"
CAS_USER_MAP = {
"username": {"tag": "cas:user"},
"nickname": {"tag": "cas:attribute", "attrs": {"name": "displayName"}},
"email": {"tag": "cas:attribute", "attrs": {"name": "email"}},
"mobile": {"tag": "cas:attribute", "attrs": {"name": "phone"}},
"avatar": {"tag": "cas:attribute", "attrs": {"name": "avatar"}},
}
# # ldap
AUTH_WITH_LDAP = False