bump release to 1.0.0
This commit is contained in:
parent
55f7c15e4e
commit
6c4c2f5175
92
README
92
README
|
@ -1,81 +1,61 @@
|
|||
The MSP application provides authentication through MSP for Django application
|
||||
and a gateway to the MSP REST API to share it with other properly authentified
|
||||
applications.
|
||||
authentic2-auth-msp
|
||||
===================
|
||||
|
||||
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.
|
||||
|
||||
- You must user a shared cache backend: through memcached, redis or the ORM.
|
||||
For example if you have a memcached installed just add the following
|
||||
fragment to your settings::
|
||||
|
||||
CACHES = {
|
||||
'default': {
|
||||
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
|
||||
'LOCATION': '127.0.0.1:11211',
|
||||
}
|
||||
}
|
||||
Authentic2 plugin to authenticate against *mon.service-public.fr* the french
|
||||
citizen portal.
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
Add the application to your installed apps::
|
||||
- Install with `pip install authentic2-auth-msp`
|
||||
- Add `A2_MSP_ENABLED = True` to your `local_settings.py` file
|
||||
- Define the needed parameters::
|
||||
|
||||
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
|
||||
|
||||
Test
|
||||
====
|
||||
|
||||
When testing agains the test platform of mon.service-public.fr you must change
|
||||
the default endpoints URL in your `local_settings.py` file::
|
||||
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 %}
|
||||
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 Gateway
|
||||
===========
|
||||
|
||||
If you want to use the OAuth2 proxy to share the access to MSP apis, you must
|
||||
user a shared cache backend: through memcached, redis or the ORM. For
|
||||
example if you have a memcached installed just add the following fragment to
|
||||
your settings::
|
||||
|
||||
CACHES = {
|
||||
'default': {
|
||||
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
|
||||
'LOCATION': '127.0.0.1:11211',
|
||||
}
|
||||
}
|
||||
|
||||
If you want a specific cache backend for the MSP plugin, use the `msp` name
|
||||
for your cache instead of `default`.
|
||||
The msp application also provides an OAuth2 gateway to MSP. To configure it your
|
||||
just need to provider a list of client_id, client_secret pairs in your
|
||||
settings, like that::
|
||||
|
||||
MSP_CLIENT_CREDENTIALS = (('client_id1', 'client_secret1'),)
|
||||
|
||||
The following URL are provided::
|
||||
The following URL are provided:
|
||||
|
||||
- /msp/authorize : like the authorize URL of MSP
|
||||
- /msp/access_token : like the access_token URL of MSP
|
||||
- /msp/documents/ : like the document list REST API endpoint of MSP
|
||||
- /msp/documents/<id>/ : like the document retrieval REST API endpoint of MSP
|
||||
|
||||
|
||||
- /authorize : like the authorize URL of MSP
|
||||
- /access_token : like the access_token URL of MSP
|
||||
- /documents/ : like the document list REST API endpoint of MSP
|
||||
- /documents/<id>/ : like the document retrieval REST API endpoint of MSP
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
__version__ = '1.0.0a'
|
||||
__version__ = '1.0.0'
|
||||
|
||||
class Plugin(object):
|
||||
def get_before_urls(self):
|
||||
|
|
Reference in New Issue