mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Cookie handling for the new portal API
This commit is contained in:
parent
1efb50c7ab
commit
62808152ee
2 changed files with 6 additions and 1 deletions
|
@ -1323,6 +1323,7 @@ def app_ssowatconf():
|
|||
"public": True,
|
||||
"uris": [domain + "/yunohost/admin" for domain in domains]
|
||||
+ [domain + "/yunohost/api" for domain in domains]
|
||||
+ [domain + "/yunohost/portalapi" for domain in domains]
|
||||
+ [
|
||||
"re:^[^/]*/%.well%-known/ynh%-diagnosis/.*$",
|
||||
"re:^[^/]*/%.well%-known/acme%-challenge/.*$",
|
||||
|
@ -1368,6 +1369,8 @@ def app_ssowatconf():
|
|||
}
|
||||
|
||||
conf_dict = {
|
||||
"cookie_secret_file": "/etc/yunohost/.ssowat_cookie_secret",
|
||||
"cookie_name": "yunohost.portal",
|
||||
"portal_domain": main_domain,
|
||||
"portal_path": "/yunohost/sso/",
|
||||
"additional_headers": {
|
||||
|
|
|
@ -11,7 +11,9 @@ from moulinette.authentication import BaseAuthenticator
|
|||
from moulinette.utils.text import random_ascii
|
||||
from yunohost.utils.error import YunohostError, YunohostAuthenticationError
|
||||
|
||||
session_secret = random_ascii()
|
||||
# FIXME : we shall generate this somewhere if it doesnt exists yet
|
||||
# FIXME : fix permissions
|
||||
session_secret = open("/etc/yunohost/.ssowat_cookie_secret").read()
|
||||
|
||||
logger = logging.getLogger("yunohostportal.authenticators.ldap_ynhuser")
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue