Files
lrc-backend/backend/auth/oidc_config.py

20 lines
1.0 KiB
Python

# Copyright (c) 2019. Tobias Kurze
from flask_pyoidc.provider_configuration import ClientMetadata, ProviderConfiguration
REG_RESPONSE_CLIENT_ID = "lrc-test-bibliothek-kit-edu"
REG_RESPONSE_CLIENT_SECRET = "d8531b30-0e6b-4280-b611-1e6c8b4911fa"
CLIENT_METADATA = ClientMetadata(REG_RESPONSE_CLIENT_ID, REG_RESPONSE_CLIENT_SECRET)
PROVIDER_URL = "https://oidc.scc.kit.edu/auth/realms/kit"
PROVIDER_NAME = 'kit_oidc'
PROVIDER_CONFIG = ProviderConfiguration(issuer=PROVIDER_URL,
client_metadata=CLIENT_METADATA,
auth_request_params={'scope': ['openid', 'email']}
# auth_request_params={'scope': ['openid', 'profile']} # avoid to get profile
# -> cookie is getting too large
# auth_request_params={'scope': ['openid', 'email', 'profile']}
)
OIDC_PROVIDERS = {PROVIDER_NAME: PROVIDER_CONFIG}