Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/imio/pas.plugins.imio
PAS plugin use to connect to imio apps
https://github.com/imio/pas.plugins.imio
Last synced: 5 days ago
JSON representation
PAS plugin use to connect to imio apps
- Host: GitHub
- URL: https://github.com/imio/pas.plugins.imio
- Owner: IMIO
- License: gpl-2.0
- Created: 2017-06-15T10:24:45.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-12-11T08:39:39.000Z (25 days ago)
- Last Synced: 2024-12-11T09:32:20.144Z (25 days ago)
- Language: Python
- Homepage:
- Size: 330 KB
- Stars: 0
- Watchers: 12
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGES.rst
- License: LICENSE.GPL
Awesome Lists containing this project
README
.. This README is meant for consumption by humans and pypi. Pypi can render rst files so please do not use Sphinx features.
If you want to learn more about writing documentation, please check out: http://docs.plone.org/about/documentation_styleguide.html
This text does not appear on pypi or github. It is a comment.================
pas.plugins.imio
================Install local or remote connector to Imio authentic (SSO).
Features
--------- Override Plone login page
- Connect with SSO
- Disabled edition of username and e-mail
- Connect with JWT.. image:: https://github.com/IMIO/pas.plugins.imio/workflows/Tests/badge.svg
:target: https://github.com/IMIO/pas.plugins.imio/actions?query=workflow%3ATests
:alt: CI Status.. image:: https://coveralls.io/repos/github/IMIO/pas.plugins.imio/badge.svg?branch=master
:target: https://coveralls.io/github/IMIO/pas.plugins.imio?branch=master
:alt: CoverallsInstallation
------------You need libffi-dev and openssl-dev packages installed (`sudo apt install libffi-dev openssl-dev`)
Install pas.plugins.imio by adding it to your buildout::[buildout]
...
eggs =
pas.plugins.imioAnd then running ``bin/buildout``
After your instance is up, you can now install pas.plugins.imio from addons page.
Usage
-----To update list of users, go to one of this view :
- /@@add-authentic-users?type=usagers
- /@@add-authentic-users?type=agentsTo login with an user registred into Plone/Zope instead of pas plugin use this view :
- Plone 4: ${portal_url}/login_form
- Plone 5.2+: ${portal_url}/zope_loginYou can also use plone default view for login with zope admin: aq_parent/@@plone-root-login
How to use JWT
--------------First, add an Openid Connect client to Authentic with these options:
- Processus d’autorisation : mot de passe du propriétaire de ressource
- Politique des identifiants : identifiant unique
- Portée de cession par crédentiels du propriétaire de la ressource : openid
- Algorithme de signature IDToken : RSA
- Oidc claims : userid | django_user_identifier | openidSecond, you can ask Authentic to get a JWT
Python code example::
import requests
url = "http://agents.localhost/idp/oidc/token/"
payload = {
"grant_type": "password",
"client_id": "client-id-plone5-app",
"client_secret": "client-secret-plone5-app",
"username": "jdoe",
"password": "jdoe",
"scope": ["openid"],
}
headers = {
"Content-Type": "application/x-www-form-urlencoded",
}response = requests.post(url, headers=headers, data=payload).json()
id_token = response.get("id_token")Finally, you can request Plone with bearer header::
import requests
url = "http://localhost:8081/imio/test-1/"
headers = {
"Accept": "application/json",
"Authorization": "Bearer {0}".format(id_token),
}response = requests.get(url, headers=headers)
Translations
------------This product has been translated into
- English
- FrenchContribute
----------- Issue Tracker: https://github.com/IMIO/pas.plugins.imio/issues
- Source Code: https://github.com/IMIO/pas.plugins.imioLicense
-------The project is licensed under the GPLv2.