{"repo":"ferrerojosh/nest-keycloak-connect","free":true,"listed":false,"github":"https://github.com/ferrerojosh/nest-keycloak-connect","clone":"git clone https://github.com/ferrerojosh/nest-keycloak-connect.git","description":"keycloak-nodejs-connect module for Nest","language":"TypeScript","stars":364,"topics":["nestjs","keycloak","typescript"],"license":"MIT","category":"auth-billing-email","readme_excerpt":"Nest Keycloak Connect You are currently viewing the pre-release documentation for version 2.0. Click here for the 1.0 stable release documentation. An adapter for keycloak-nodejs-connect Features - Protect your resources using Keycloak's Authorization Services. - Simply add @Resource , @Scopes , or @Roles in your controllers and you're good to go. - Compatible with Fastify platform. Installation Yarn NPM Getting Started Module registration Registering the module: Async registration is also available: KeycloakConfigService You can also register by just providing the keycloak.json path and an optional module configuration: Guards Register any of the guards either globally, or scoped in your controller. Global registration using APP GUARD token NOTE: These are in order, see https://docs.nestjs.com/guards#binding-guards for more information. Scoped registration What does these providers do ? AuthGuard Adds an authentication guard, you can also have it scoped if you like (using regular @UseGuards(AuthGuard) in your controllers). By default, it will throw a 401 unauthorized when it is unable to verify the JWT token or Bearer header is missing. ResourceGuard Adds a resource guard, which is permissive by default (can be configured see options). Only controllers annotated with @Resource and methods with @Scopes are handled by this guard. NOTE: This guard is not necessary if you are using role-based authorization exclusively. You can use role guard exclusively for that. RoleGuard Adds ","default_branch":null,"files":null,"tree":[],"storefront":"/r/ferrerojosh","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/ferrerojosh/nest-keycloak-connect/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}