SECRET_KEY = 'secret'

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': ':memory:',
        'USER': '',
        'PASSWORD': '',
        'HOST': '',
        'PORT': '',
    }
}

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
                'django.template.context_processors.debug',
                'django.template.context_processors.request',
                'django.contrib.auth.context_processors.auth',
                'django.contrib.messages.context_processors.messages',

                'django_auth_adfs.context_processors.adfs_url',
            ],
        },
    },
]

TEMPLATE_DIRS = (
    'templates',
)
TEMPLATE_CONTEXT_PROCESSORS = (
    "django.contrib.auth.context_processors.auth",
    "django.core.context_processors.debug",
    "django.core.context_processors.i18n",
    "django.core.context_processors.media",
    "django.core.context_processors.static",
    "django.core.context_processors.tz",
    "django.contrib.messages.context_processors.messages",
    'django_auth_adfs.context_processors.adfs_url',
)
MIDDLEWARE_CLASSES = (
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',

    'django_auth_adfs.middleware.LoginRequiredMiddleware',
)

INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',

    'django_auth_adfs',
    'tests',
)

AUTHENTICATION_BACKENDS = (
    "django.contrib.auth.backends.ModelBackend",
    'django_auth_adfs.backend.AdfsBackend',
)

ROOT_URLCONF = 'tests.urls'

STATIC_ROOT = '/tmp/'  # Dummy
STATIC_URL = '/static/'

AUTH_ADFS = {
    "SERVER": "adfs.example.com",
    "REDIR_URI": "example.com",
    "CLIENT_ID": "your-configured-client-id",
    "RESOURCE": "your-ad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5FUaUffetl4Q5ebrJ1IoBNZ6+S
aK7TCdKeEyDaHh6/Dg==
-----END CERTIFICATE-----
""",
    "AUDIENCE": "microsoft:identityserver:your-RelyingPartyTrust-identifier",
    "ISSUER": "http://adfs.example.com/adfs/services/trust",
    "CA_BUNDLE": "/path/to/ca-bundle.pem",
    "CLAIM_MAPPING": {"first_name": "given_name",
                      "last_name": "family_name",
                      "email": "email"},
    "LOGIN_EXEMPT_URLS": ["^context_processor/$"]
}
