Commit Graph

285 Commits

Author SHA1 Message Date
Benjamin Dauvergne cde50d567c msp: make login-or-link the default behaviour also for connexion from the login page 2014-02-25 15:50:52 +01:00
Benjamin Dauvergne 0d6cef8650 msp: log when deleting stale msp accounts 2014-02-06 14:21:26 +01:00
Benjamin Dauvergne 842330193b msp/views: fix missing variable cache 2014-01-21 09:04:01 +01:00
Benjamin Dauvergne 8110e5f416 msp: always ask for the DEL_AGC scope with the GET_AGC scope 2014-01-08 11:36:55 +01:00
Benjamin Dauvergne 7db7284f87 templates: fix wording 2014-01-08 11:30:30 +01:00
Benjamin Dauvergne a3ca13c3f3 msp: replace PARTENAIRE in MSP templates by 'compte citoyen' 2014-01-08 11:18:34 +01:00
Benjamin Dauvergne a768fd7fe1 msp: use all graphical and html resources from MSP
- 3 new views: link management, unlinking confirmation, unlinking done.
- corrections to close-popup-redirect.html to work with URL passed
	through template variables and not the query string
2014-01-08 01:18:45 +01:00
Benjamin Dauvergne 7b332f0bce msp: integrate msp theme 2014-01-06 12:46:10 +01:00
Benjamin Dauvergne e428e17d99 msp: do no throw an unicity constraint error when user try to create a new link when an existing still exist
Problem happens when deleting a link from MSP a trying to recreate it.
2013-12-19 21:58:53 +01:00
Benjamin Dauvergne 48e7579f03 msp: allow the authorization view to display in cross-domain iframes 2013-12-17 23:14:27 +01:00
Benjamin Dauvergne 52a26eee5b msp: argument next_url of redirect_and_come_back should support query strings 2013-12-06 16:44:43 +01:00
Benjamin Dauvergne ce4fd2fadc msp: hide the connection box when nomsp is in the query string 2013-12-06 16:39:29 +01:00
Benjamin Dauvergne 5b25a3e97f msp: update fr translation 2013-12-06 16:34:00 +01:00
Benjamin Dauvergne bff31671e1 msp: in link creation from msp workflow, add message to incite the user to authenticate 2013-12-06 16:32:33 +01:00
Benjamin Dauvergne bdc3ab5d68 msp: add a refresh token method to MspAccount models to verify if the account link is alive 2013-12-06 16:19:05 +01:00
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