diff --git a/README.md b/README.md index 9c8a85fb15aece9342e26f771500326f233219cf..320451edefc64a9aec042816b01dacb3d51662f0 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,33 @@ -# Sample OAuth 2.0 Clients +# PHP Auth Demo -https://github.com/aaronpk/sample-oauth2-client +Cette démo simpliste montre comment utiliser AriseID Connect via Oauth2 +ou OpenID Connect. +Le code fait une centaine de ligne, sans dépendances et facilement adaptable à d'autres cas d'usages. -Sample OAuth 2.0 clients using the GitHub and Google APIs +**Nous recommandons cependant d'utiliser des librairies pour la sécurité de votre application,** +**notamment sur la gestion des erreurs.** -Read more info in the book [OAuth 2.0 Simplified](https://oauth2simplified.com) +> Inspiré de https://github.com/aaronpk/sample-oauth2-client + +## https://php.auth.demo.iiens.net + +## Installation locale + +### Installer PHP + +Sur Ubuntu/Debian +```shell +sudo apt install php-cli +sudo apt install php-curl +``` + +### Démarrer le serveur web + +```shell +php -S localhost:8000 +``` + +Les endpoints sont changeables via variable d'environnement : +```shell +AIDC_CLIENT_ID="f97b146f-121a-4400-a79c-7c2ecbbd87f8" AIDC_CLIENT_SECRET="y6hsryRm6P~QSen~Xs0UtvkEcK" OAUTH_SERVER="http://oidc.127.0.0.1.nip.io:4444" API_SERVER="http://api.127.0.0.1.nip.io:5000" php -S localhost:8000 +``` \ No newline at end of file