From 06285a206f31da22121ec1bd85403f676a9f495c Mon Sep 17 00:00:00 2001 From: wpetit Date: Wed, 20 May 2020 10:50:12 +0200 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'README.md'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 159f366..e501141 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,10 @@ Middleware [`goweb`](https://forge.cadoles.com/wpetit/goweb) pour authentification [OpenID Connect](https://openid.net/connect/). -[Voir l'application de test pour un exemple d'utilisation](https://forge.cadoles.com/wpetit/goweb-oidc/src/branch/master/cmd/server) \ No newline at end of file +### Exemple + +Une application web de test est disponible dans le répertoire [`cmd/server`](./cmd/server). Voici les principaux exemples d'utilisation de la librairie: + +- [Initialisation du service `oidc`](https://forge.cadoles.com/wpetit/goweb-oidc/src/branch/master/cmd/server/container.go#L78-L87) +- [Ajout du middleware d'authentification dans les routes HTTP](https://forge.cadoles.com/wpetit/goweb-oidc/src/branch/master/internal/route/mount.go#L12-L19) +- [Récupération de l'`IDToken` dans un handler HTTP](https://forge.cadoles.com/wpetit/goweb-oidc/src/branch/master/internal/route/login.go#L18-L21) \ No newline at end of file