Skip to content
Snippets Groups Projects
Commit f1256e4d authored by Nico Vermaas's avatar Nico Vermaas
Browse files

Merge branch 'master' into 'astronauth'

Master

See merge request !279
parents 17830f7c 605dea07
No related branches found
No related tags found
2 merge requests!280Astronauth,!279Master
Pipeline #43781 passed
import os
import logging
logger = logging.getLogger(__name__)
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
......@@ -225,7 +227,7 @@ AUTHENTICATION_BACKENDS = [
try:
KEYCLOAK_URL = os.environ['KEYCLOAK_URL']
except:
KEYCLOAK_URL = 'https://sdc-dev.astron.nl/auth'
KEYCLOAK_URL = 'https://keycloak.astron.nl/auth'
SOCIALACCOUNT_PROVIDERS = {
'keycloak': {
......@@ -238,7 +240,11 @@ SOCIALACCOUNT_PROVIDERS = {
try:
LOGIN_REDIRECT_URL = os.environ['LOGIN_REDIRECT_URL']
except:
LOGIN_REDIRECT_URL = 'https://sdc-dev.astron.nl:5554/atdb/'
LOGIN_REDIRECT_URL = 'https://sdc.astron.nl:5554/atdb/'
logger.info("LOGIN_REDIRECT_URL:" + LOGIN_REDIRECT_URL)
logger.info("KEYCLOAK_URL:" + KEYCLOAK_URL)
SESSION_COOKIE_NAME = 'my_service_name_session_id'
CSRF_COOKIE_NAME = 'my_service_csrftoken'
......@@ -25,3 +25,10 @@ DATABASES = {
AUTH_PASSWORD_VALIDATORS = []
LOGIN_REDIRECT_URL = "http://localhost:8000/atdb"
SOCIALACCOUNT_PROVIDERS = {
'keycloak': {
'KEYCLOAK_URL': 'https://sdc-dev.astron.nl/auth',
'KEYCLOAK_REALM': 'SDC',
'SCOPE': ['openid', 'profile', 'email']
}
}
\ No newline at end of file
......@@ -36,11 +36,3 @@ DATABASES = {
# https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = []
SOCIALACCOUNT_PROVIDERS = {
'keycloak': {
'KEYCLOAK_URL': 'https://keycloak.astron.nl/auth', # replace by https://keycloak.astron.nl/auth for production
'KEYCLOAK_REALM': 'SDC', # change this depending on which realm to use
'SCOPE': ['openid', 'profile', 'email']
}
}
......@@ -18,7 +18,7 @@ logger = logging.getLogger(__name__)
@receiver(pre_save, sender=Task)
def pre_save_task_handler(sender, **kwargs):
logger.info("SIGNAL : pre_save Task(" + str(kwargs.get('instance')) + ")")
#logger.info("SIGNAL : pre_save Task(" + str(kwargs.get('instance')) + ")")
handle_pre_save(sender, **kwargs)
def handle_pre_save(sender, **kwargs):
......@@ -27,7 +27,7 @@ def handle_pre_save(sender, **kwargs):
:param (in) sender: The model class that sends the trigger
:param (in) kwargs: The instance of the object that sends the trigger.
"""
logger.info("handle_pre_save(" + str(kwargs.get('instance')) + ")")
#logger.info("handle_pre_save(" + str(kwargs.get('instance')) + ")")
myTaskObject = kwargs.get('instance')
# IF this object does not exist yet, then abort, and let it first be handled by handle_post_save (get get a id).
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment