This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
mandayejs/tests/settings.py

50 lines
1.2 KiB
Python

from django.conf import settings
from rest_framework.settings import api_settings
try:
import hobo
except(ImportError,):
hobo = None
HOBO = hobo
MELLON_IDENTITY_PROVIDERS = [
{
'METADATA_URL': 'http://testsever.org/idp/saml2/metadata'
}
]
SITE_APP = 'mandayejs.applications.Test'
SECRET_KEY = 'od5cei4aeveel8dui4lei2ou9ahsei2A'
KNOWN_SERVICES = {
"service":{
"testserver": {
"title": "testserver",
"orig": "testserver",
"url": "http://testserver",
"secret": "od5cei4aeveel8dui4lei2ou9ahsei2A",
"verif_orig": "testserver"
}
}
}
HOBO_ANONYMOUS_SERVICE_USER_CLASS = 'hobo.rest_authentication.AnonymousAdminServiceUser'
# REST FRAMEWORK SETTINGS
if hobo:
AUTHENTICATION_CLASSES = (
'rest_framework.authentication.SessionAuthentication',
'rest_framework.authentication.BasicAuthentication',
'hobo.rest_authentication.PublikAuthentication',
)
else:
AUTHENTICATION_CLASSES = (
'rest_framework.authentication.SessionAuthentication',
'rest_framework.authentication.BasicAuthentication',
)
api_settings.user_settings.update({
'DEFAULT_AUTHENTICATION_CLASSES' : AUTHENTICATION_CLASSES,
})