76efb6fc68
This implements a very small part of the OIDC session management as described in http://openid.net/specs/openid-connect-session-1_0-17.html#rfc.section.5. It does not implement the full session management (using iframes) and does not implement the registration and verification of logout redirect uri's.
34 lines
1.1 KiB
Python
34 lines
1.1 KiB
Python
from django.core.urlresolvers import reverse
|
|
from django.conf import settings as django_settings
|
|
|
|
from oidc_provider import settings
|
|
from oidc_provider.lib.utils.common import get_issuer
|
|
|
|
|
|
class ProviderInfoEndpoint(object):
|
|
|
|
@classmethod
|
|
def create_response_dic(cls):
|
|
dic = {}
|
|
|
|
dic['issuer'] = get_issuer()
|
|
|
|
SITE_URL = settings.get('SITE_URL')
|
|
|
|
dic['authorization_endpoint'] = SITE_URL + reverse('oidc_provider:authorize')
|
|
dic['token_endpoint'] = SITE_URL + reverse('oidc_provider:token')
|
|
dic['userinfo_endpoint'] = SITE_URL + reverse('oidc_provider:userinfo')
|
|
dic['end_session_endpoint'] = SITE_URL + reverse('oidc_provider:logout')
|
|
|
|
from oidc_provider.models import Client
|
|
types_supported = [x[0] for x in Client.RESPONSE_TYPE_CHOICES]
|
|
dic['response_types_supported'] = types_supported
|
|
|
|
dic['jwks_uri'] = SITE_URL + reverse('oidc_provider:jwks')
|
|
|
|
dic['id_token_signing_alg_values_supported'] = ['RS256']
|
|
|
|
# See: http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes
|
|
dic['subject_types_supported'] = ['public']
|
|
|
|
return dic
|