Commit Graph

220 Commits

Author SHA1 Message Date
Benjamin Dauvergne 9fb7d37e93 msp: when creating a new link, save the access token 2013-12-06 15:59:24 +01:00
Benjamin Dauvergne 14fe0f9f75 msp: preserve access token in callback views after call to the token web service 2013-12-06 15:57:54 +01:00
Benjamin Dauvergne 66e3e4a7aa msp: update fr translations 2013-12-06 15:57:35 +01:00
Benjamin Dauvergne 8bc98eb941 msp: store access token in account association object
The access token is used to get to the refresh token for verifying
existing links.
2013-12-06 15:56:48 +01:00
Benjamin Dauvergne 140b806fa2 msp: cleanup 2013-12-06 15:23:14 +01:00
Benjamin Dauvergne 7c177f1bce msp: add login-or-link view 2013-12-06 15:23:14 +01:00
Benjamin Dauvergne 6dfb0d2b43 msp: remove dead code 2013-12-06 15:23:14 +01:00
Benjamin Dauvergne 6ae76bc1c4 msp: add redirect_and_come_back() for redirect to another page and then coming back to the current one 2013-12-06 15:23:14 +01:00
Benjamin Dauvergne ab1f83d19c msp: add a next_url argument to the redirect() method it overrides default computation of the redirect URL 2013-12-06 15:10:31 +01:00
Benjamin Dauvergne f4e7c44a66 msp: clean unused imports 2013-12-06 15:05:09 +01:00
Benjamin Dauvergne aa2f51f995 msp: fix authn context name 2013-11-20 15:10:25 +01:00
Benjamin Dauvergne 1e8b86aeb8 msp: fix missing self argument 2013-11-20 15:09:17 +01:00
Benjamin Dauvergne 0fdc7916ee msp: msp authentication is equivalent to password authentication over HTTPs for SAML 2.0 2013-11-20 15:05:34 +01:00
Benjamin Dauvergne 4efcd9a38d msp: add OAuth2 and rest proxy endpoints 2013-10-22 17:31:14 +02:00
Benjamin Dauvergne 7c5870db02 msp/locale: fix syntax error 2013-10-16 10:57:04 +02:00
Benjamin Dauvergne 5811e4d31f msp/locale: fix grammatical error, use mon.Service-Public.fr as MSP name everywhere 2013-10-16 10:10:24 +02:00
Benjamin Dauvergne 86d79ec00f msp: add missing static files 2013-10-15 23:23:53 +02:00
Benjamin Dauvergne 7895896147 msp/views: remove remaining reference to SSOViewMixin 2013-10-11 22:53:05 +02:00
Benjamin Dauvergne 3271f13807 msp: remove SSOViewMixin and reduce scope required for sso views 2013-10-11 22:52:15 +02:00
Benjamin Dauvergne 6e1817dc85 add msp integration application
Requirements
============

Your base template must use django-sekizai and must contain a sekizai block named
"css" and another named "js" respectively for stylesheet and javascript files.

Installation
============

Add the application to your installed apps::

   INSTALLED_APPS += ( 'msp', )

Install the authentication backend::

   AUTHENTICATION_BACKENDS += ( 'msp.backends.MspBackend', )

Define needed settings, we show here the default values::

   MSP_AUTHORIZE_URL = 'https://mon.service-public.fr/apis/app/oauth/authorize'
   MSP_TOKEN_URL = 'https://mon.service-public.fr/apis/app/oauth/token'
   MSP_API_URL = 'https://mon.service-public.fr/apis/'
   MSP_CLIENT_ID = 'id assigned by DIMAP'
   MSP_CLIENT_SECRET = 'secret assigned by DIMAP'
   MSP_CLIENT_CERTIFICATE = ('/my-path/my-certificate.crt', '/my-path/my-certificate.key')
   MSP_VERIFY_CERTIFICATE = False

You must plug the application views in your urls.py file by adding this
content::

   url(r'^msp/', include('msp.urls')),

To link your account to MSP or unlink your account from MSP, add the following
content to your template::

   {% include 'msp/linking.html' %}

It will show a linking link when unauthenticated and when no msp account is
linked to the current account or an unlinking link when authenticated and a
to MSP exists.

To show a connection box include this content in your template::

   {% include 'msp/connecting.html' %}

To make the include file use a popup to talk to MSP add the popup parameter
like in the following content::

   {% include 'msp/connecting.html' with popup=1 %}
2013-10-11 22:05:21 +02:00