Metadata-Version: 2.0
Name: kinto-portier
Version: 0.4.0
Summary: Portier authentication support in Kinto
Home-page: https://github.com/Kinto/kinto-portier
Author: Mozilla Services
Author-email: services-dev@mozilla.com
License: Apache License (2.0)
Keywords: web services
Platform: UNKNOWN
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application
Classifier: License :: OSI Approved :: Apache Software License
Requires-Dist: PyJWT
Requires-Dist: cryptography
Requires-Dist: kinto
Requires-Dist: portier-python
Requires-Dist: requests

Portier authentication support for Kinto
========================================

|travis| |master-coverage|

.. |travis| image:: https://travis-ci.org/Kinto/kinto-portier.svg?branch=master
    :target: https://travis-ci.org/Kinto/kinto-portier

.. |master-coverage| image::
    https://coveralls.io/repos/Kinto/kinto-portier/badge.png?branch=master
    :alt: Coverage
    :target: https://coveralls.io/r/Kinto/kinto-portier

*kinto-portier* enables authentication in *Kinto* applications using
an email address.

It provides:

* An authentication policy class;
* Integration with *Kinto* cache backend for token verifications;
* Integration with *Kinto* for heartbeat view checks;
* Some optional endpoints to perform the *OAuth* dance (*optional*).


* `Kinto documentation <http://kinto.readthedocs.io/en/latest/>`_
* `Issue tracker <https://github.com/Kinto/kinto-portier/issues>`_


Installation
------------

Install the Python package:

::

    pip install kinto-portier


Include the package in the project configuration:

::

    kinto.includes = kinto_portier

And configure authentication policy using `pyramid_multiauth
<https://github.com/mozilla-services/pyramid_multiauth#deployment-settings>`_ formalism:

::

    multiauth.policies = portier
    multiauth.policy.portier.use = kinto_portier.authentication.PortierOAuthAuthenticationPolicy

By default, it will rely on the cache configured in *Kinto*.


Configuration
-------------

Fill those settings with the values obtained during the application registration:

::

    kinto.portier.broker_url = https://broker.portier.io
    kinto.portier.webapp.authorized_domains = *.github.io
    # kinto.portier.cache_ttl_seconds = 300
    # kinto.portier.state.ttl_seconds = 3600



Login flow
----------

OAuth Bearer token
::::::::::::::::::

Use the OAuth token with this header:

::

    Authorization: Portier <jwt_token>


:notes:

    If the token is not valid, this will result in a ``401`` error response.


Changelog
=========

This document describes changes between each past release.


0.4.0 (2017-05-17)
------------------

**Bug fixes**

- Upgrade to Kinto 7 and set a ttl when using the cache.


0.3.0 (2017-03-08)
------------------

- Make it works with Python 3.5

0.2.0 (2017-02-10)
------------------

- Initial implementation


Contributors
============

* Mathieu Leplatre <mathieu@mozilla.com>
* Nicolas Perriault <nperriault@mozilla.com>
* Rémy Hubscher <rhubscher@mozilla.com>


