OAuth2 IdP backend for Authentic2
This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
Benjamin Dauvergne afd3f287ec add new web service proxy service using OAuth2 for authentication
You can translate user identifiers by referring to NameID in the output
URL.
2014-03-27 10:22:14 +01:00
authentic2_idp_oauth2 add new web service proxy service using OAuth2 for authentication 2014-03-27 10:22:14 +01:00
README.txt add new web service proxy service using OAuth2 for authentication 2014-03-27 10:22:14 +01:00
setup.py setup.py: use get_version 2014-03-13 13:35:53 +01:00

README.txt

Install
=======

You just have to install the package in your virtualenv and relaunch, it will
be automatically loaded by the plugin framework.


Settings
========

AUTOMATIC_GRANT:

    A list of URL prefix which are automatically granted scopes without asking
    the user. Example::

        A2_OAUTH2_AUTOMATIC_GRANT = (
                ('http://localhost:8000/', ('read',)),
        )

Web Service proxy
=================

You can configure simple REST web-service in
/admin/authentic2_idp_oauth2/webservice/. URL field can contain template
variable like that:

    http://example.com/info/?user={{ user.username|urlencode }} 

or like:

    http://example.com/categories/?format=json&NameID={{ federations.service_1.links.0|urlencode }}

Supported authentication mechanisms on the target web-service are HMAC-SHA-256
and HMAC-SHA-1 as specified on http://doc.entrouvert.org/portail-citoyen/dev/.

You can access your newly proxy web-service through those URLs:

    http://your-idp.com/idp/oauth2/ws-proxy/<web-service.id>/

or:

    http://your-idp.com/idp/oauth2/ws-proxy/<web-service.slug>/