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 of sending Seahub email. Can be s(seconds), m(minutes), h(hours), d(days)
|
||||||
interval = 30m
|
interval = 30m
|
||||||
|
|
||||||
# Enable statistics
|
|
||||||
[STATISTICS]
|
[STATISTICS]
|
||||||
enabled=false
|
enabled=true
|
||||||
|
|
||||||
# Enable file history
|
|
||||||
[FILE HISTORY]
|
[FILE HISTORY]
|
||||||
enabled = true
|
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$"
|
SECRET_KEY = "e$3$hp7u@1ba25kxxa46a7q+bc*3dfulsxhyq+nmap1f@me78$"
|
||||||
|
|
||||||
DOMAIN = "seafile.rik.veenboer.xyz"
|
DOMAIN = "rik.veenboer.xyz"
|
||||||
SERVICE_URL = f"https://{DOMAIN}"
|
SERVICE_URL = f"https://seafile.{DOMAIN}"
|
||||||
CSRF_TRUSTED_ORIGINS = [SERVICE_URL]
|
CSRF_TRUSTED_ORIGINS = [SERVICE_URL]
|
||||||
DEBUG = True
|
DEBUG = True
|
||||||
TIME_ZONE = 'Europe/Amsterdam'
|
TIME_ZONE = "Europe/Amsterdam"
|
||||||
DATABASES = {
|
DATABASES = {
|
||||||
'default': {
|
"default": {
|
||||||
'ENGINE': 'django.db.backends.mysql',
|
"ENGINE": "django.db.backends.mysql",
|
||||||
'NAME': 'seahub_db',
|
"NAME": "seahub_db",
|
||||||
'USER': 'seafile',
|
"USER": "seafile",
|
||||||
'PASSWORD': 'PASSWORD',
|
"PASSWORD": "PASSWORD",
|
||||||
'HOST': 'seafile-mysql',
|
"HOST": "seafile-mysql",
|
||||||
'PORT': '3306',
|
"PORT": "3306",
|
||||||
'OPTIONS': {'charset': 'utf8mb4'},
|
"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.
|
# 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_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_AUTHORIZATION_URL = f"https://{OAUTH_PROVIDER_DOMAIN}/application/o/authorize/"
|
||||||
OAUTH_PROVIDER_DOMAIN = 'authentik.rik.veenboer.xyz'
|
OAUTH_TOKEN_URL = f"https://{OAUTH_PROVIDER_DOMAIN}/application/o/token/"
|
||||||
|
OAUTH_USER_INFO_URL = f"https://{OAUTH_PROVIDER_DOMAIN}/application/o/userinfo/"
|
||||||
OAUTH_AUTHORIZATION_URL = f'https://{OAUTH_PROVIDER_DOMAIN}/application/o/authorize/'
|
OAUTH_SCOPE = ["openid", "profile", "seafile"]
|
||||||
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_ATTRIBUTE_MAP = {
|
OAUTH_ATTRIBUTE_MAP = {
|
||||||
"seafile_id": (True, "email"),
|
"seafile_id": (True, "email"),
|
||||||
"seafile_email": (False, "contact_email"),
|
"seafile_email": (False, "contact_email"),
|
||||||
|
|||||||
Reference in New Issue
Block a user