adjust configuration for sso
This commit is contained in:
@@ -12,11 +12,9 @@ enabled = false
|
||||
## interval of sending Seahub email. Can be s(seconds), m(minutes), h(hours), d(days)
|
||||
interval = 30m
|
||||
|
||||
# Enable statistics
|
||||
[STATISTICS]
|
||||
enabled=false
|
||||
enabled=true
|
||||
|
||||
# Enable file history
|
||||
[FILE HISTORY]
|
||||
enabled = true
|
||||
suffix = md,txt,doc,docx,xls,xlsx,ppt,pptx,sdoc,py
|
||||
suffix = md,txt,doc,docx,xls,xlsx,ppt,pptx,sdoc
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
SECRET_KEY = "e$3$hp7u@1ba25kxxa46a7q+bc*3dfulsxhyq+nmap1f@me78$"
|
||||
|
||||
DOMAIN = "seafile.rik.veenboer.xyz"
|
||||
SERVICE_URL = f"https://{DOMAIN}"
|
||||
DOMAIN = "rik.veenboer.xyz"
|
||||
SERVICE_URL = f"https://seafile.{DOMAIN}"
|
||||
CSRF_TRUSTED_ORIGINS = [SERVICE_URL]
|
||||
DEBUG = True
|
||||
TIME_ZONE = 'Europe/Amsterdam'
|
||||
TIME_ZONE = "Europe/Amsterdam"
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.mysql',
|
||||
'NAME': 'seahub_db',
|
||||
'USER': 'seafile',
|
||||
'PASSWORD': 'PASSWORD',
|
||||
'HOST': 'seafile-mysql',
|
||||
'PORT': '3306',
|
||||
'OPTIONS': {'charset': 'utf8mb4'},
|
||||
"default": {
|
||||
"ENGINE": "django.db.backends.mysql",
|
||||
"NAME": "seahub_db",
|
||||
"USER": "seafile",
|
||||
"PASSWORD": "PASSWORD",
|
||||
"HOST": "seafile-mysql",
|
||||
"PORT": "3306",
|
||||
"OPTIONS": {"charset": "utf8mb4"},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,15 +34,12 @@ OAUTH_CLIENT_SECRET = "G1F5UwQyMDFSZpo8OjMLdU7TbMniWzNDJqjGHsGo1Yr03MOMM5uAw4gHL
|
||||
|
||||
# Callback url when user authentication succeeded. Note, the redirect url you input when you register your client application MUST be exactly the same as this value.
|
||||
OAUTH_REDIRECT_URL = f"{SERVICE_URL}/oauth/callback/"
|
||||
OAUTH_PROVIDER_DOMAIN = f"authentik.{DOMAIN}"
|
||||
|
||||
# The following should NOT be changed if you are using Github as OAuth provider.
|
||||
OAUTH_PROVIDER_DOMAIN = 'authentik.rik.veenboer.xyz'
|
||||
|
||||
OAUTH_AUTHORIZATION_URL = f'https://{OAUTH_PROVIDER_DOMAIN}/application/o/authorize/'
|
||||
OAUTH_TOKEN_URL = f'https://{OAUTH_PROVIDER_DOMAIN}/application/o/token/'
|
||||
OAUTH_USER_INFO_URL = f'https://{OAUTH_PROVIDER_DOMAIN}/application/o/userinfo/'
|
||||
# OAUTH_SCOPE = ["openid", "profile", "email", "seafile"]
|
||||
OAUTH_SCOPE = ["profile", "seafile"]
|
||||
OAUTH_AUTHORIZATION_URL = f"https://{OAUTH_PROVIDER_DOMAIN}/application/o/authorize/"
|
||||
OAUTH_TOKEN_URL = f"https://{OAUTH_PROVIDER_DOMAIN}/application/o/token/"
|
||||
OAUTH_USER_INFO_URL = f"https://{OAUTH_PROVIDER_DOMAIN}/application/o/userinfo/"
|
||||
OAUTH_SCOPE = ["openid", "profile", "seafile"]
|
||||
OAUTH_ATTRIBUTE_MAP = {
|
||||
"seafile_id": (True, "email"),
|
||||
"seafile_email": (False, "contact_email"),
|
||||
|
||||
Reference in New Issue
Block a user