Premiere implementation de sso
All checks were successful
Organisation/sirh/pipeline/head This commit looks good
All checks were successful
Organisation/sirh/pipeline/head This commit looks good
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -24,9 +24,10 @@ BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
SECRET_KEY = config('SECRET_KEY')
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = config('DEBUG', default=False, cast=bool)
|
||||
DEBUG = config('DEBUG', default=True, cast=bool)
|
||||
|
||||
ALLOWED_HOSTS = config('ALLOWED_HOSTS', default=[]).split(',')
|
||||
ALLOWED_HOSTS = config('ALLOWED_HOSTS', default=[]).split(',')
|
||||
CSRF_TRUSTED_ORIGINS = config("CSRF_TRUSTED_ORIGINS", default=[]).split(",")
|
||||
|
||||
# Application definition
|
||||
|
||||
@@ -77,24 +78,16 @@ WSGI_APPLICATION = 'SIRH.wsgi.application'
|
||||
# https://docs.djangoproject.com/en/5.2/ref/settings/#databases
|
||||
|
||||
|
||||
if config('ENVIRONMENT') == 'local':
|
||||
DATABASES = {
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
|
||||
}
|
||||
}
|
||||
else:
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.mysql',
|
||||
'NAME': config('DATABASE_NAME'),
|
||||
'USER': config('DATABASE_USER'),
|
||||
'PASSWORD': config('DATABASE_PASSWORD'),
|
||||
'HOST': config('DATABASE_HOST'),
|
||||
'PORT': config('DATABASE_PORT'),
|
||||
}
|
||||
'ENGINE': 'django.db.backends.mysql',
|
||||
'NAME': config("DB_NAME"),
|
||||
'USER': config("DB_USER"),
|
||||
'PASSWORD': config("DB_PASSWORD"),
|
||||
'HOST': config("DB_HOST"),
|
||||
'PORT': config("DB_PORT", cast=int),
|
||||
}
|
||||
}
|
||||
|
||||
# Password validation
|
||||
# https://docs.djangoproject.com/en/5.2/ref/settings/#auth-password-validators
|
||||
@@ -151,10 +144,10 @@ DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
||||
# LOGIN_URL = '/client/'
|
||||
LOGIN_URL = 'simple-sso-login'
|
||||
|
||||
SSO_PRIVATE_KEY = 'wV3nf1YXeZpepf8iJAdWcfJOS4BVXYlIKsKES2RheuJLu5ycgm0ZK3zgdw9ODjdo' # Designe la clé privée
|
||||
SSO_PUBLIC_KEY = 'E8vV810D8HSmhUwl6abuZALhO5fmUdjjd3wAVCFZyyDX7SsSeAf9XwVyKZ5brilt' # Designe la clé publique
|
||||
SSO_SERVER = 'http://localhost:8000/server/'
|
||||
SSO_LOGOUT_URL = 'http://localhost:8000/deconnexion'
|
||||
SSO_PRIVATE_KEY = 'D2brFY3LnNDLQBBnvYPXAn185Wi9EpPvnHsUosjEZ9vZMyEtXqkcVfFWkVbN0xpG'
|
||||
SSO_PUBLIC_KEY = 'm9JDP3uGPmGG9ULqPw2BY3ryBNMTGRsuukgIOhk7lIN9lT0wlr2zhoRZiNZ28UCM'
|
||||
SSO_SERVER = 'http://test-authentification.cerfig.org:89/server/'
|
||||
#SSO_LOGOUT_URL = 'http://test-authentification.cerfig.org:89/deconnexion'
|
||||
|
||||
# Configuration de l'email
|
||||
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
||||
@@ -162,6 +155,6 @@ EMAIL_HOST = 'ssl0.ovh.net'
|
||||
EMAIL_PORT = 465
|
||||
EMAIL_USE_SSL = True
|
||||
EMAIL_USE_TLS = False
|
||||
EMAIL_HOST_USER = 'support.it@cerfig.org'
|
||||
EMAIL_HOST_PASSWORD = 'Cerfig2025'
|
||||
DEFAULT_FROM_EMAIL = EMAIL_HOST_USER
|
||||
EMAIL_HOST_USER = config("EMAIL_HOST_USER")
|
||||
EMAIL_HOST_PASSWORD = config("EMAIL_HOST_PASSWORD")
|
||||
DEFAULT_FROM_EMAIL = EMAIL_HOST_USER
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<div class="col-1 bg-danger border d-flex flex-column vh-100 pt-5 sticky-top">
|
||||
<a href="http://localhost:8002/" class="text-white text-center fw-bold text-decoration-none mb-4" style="font-size:1.4em">
|
||||
<a href="http://test-sirh.cerfig.org:89/" class="text-white text-center fw-bold text-decoration-none mb-4" style="font-size:1.4em">
|
||||
<i class="bi bi-people-fill fs-1 d-block"></i>SIRH
|
||||
</a>
|
||||
<a href="http://localhost:8001/" class="text-white text-center fw-bold text-decoration-none mb-4" style="font-size:1.4em">
|
||||
<a href="http://test-sgl.cerfig.org:89/" class="text-white text-center fw-bold text-decoration-none mb-4" style="font-size:1.4em">
|
||||
<i class="bi bi-building-gear fs-1 d-block"></i> SGL
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<i class="bi bi-calendar-check"></i> Réservation
|
||||
</a>
|
||||
{% comment %} {% url 'deconnexion' %} {% endcomment %}
|
||||
<a href="" class="text-white fw-bold text-decoration-none mb-4" style="font-size: 1.2em;">
|
||||
<a href="http://test-authentification.cerfig.org:89/deconnexion" class="text-white fw-bold text-decoration-none mb-4" style="font-size: 1.2em;">
|
||||
<i class="bi bi-box-arrow-right"></i> Déconnexion
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user