{"id":15489296,"url":"https://github.com/devsu/condor-jwt-keycloak","last_synced_at":"2026-04-10T20:42:02.062Z","repository":{"id":57205274,"uuid":"90329414","full_name":"devsu/condor-jwt-keycloak","owner":"devsu","description":"Condor middleware to authenticate GRPC calls using Keycloak.","archived":false,"fork":false,"pushed_at":"2017-05-08T01:02:55.000Z","size":21,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-20T01:02:28.923Z","etag":null,"topics":["authentication","condor","condor-framework","grpc","keycloak","middleware","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devsu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-05T02:34:06.000Z","updated_at":"2020-06-11T17:54:43.000Z","dependencies_parsed_at":"2022-09-18T00:50:43.179Z","dependency_job_id":null,"html_url":"https://github.com/devsu/condor-jwt-keycloak","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsu%2Fcondor-jwt-keycloak","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsu%2Fcondor-jwt-keycloak/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsu%2Fcondor-jwt-keycloak/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsu%2Fcondor-jwt-keycloak/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devsu","download_url":"https://codeload.github.com/devsu/condor-jwt-keycloak/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246059336,"owners_count":20717085,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","condor","condor-framework","grpc","keycloak","middleware","nodejs"],"created_at":"2024-10-02T07:04:52.764Z","updated_at":"2026-04-10T20:41:58.397Z","avatar_url":"https://github.com/devsu.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# condor-jwt-keycloak\n\nThis module lets you authenticate GRPC calls using JSON Web Tokens (**JWTs**) created by [Keycloak](http://www.keycloak.org/) in your [Condor](https://github.com/devsu/condor-framework) GRPC services.\n\n[![Build Status](https://travis-ci.org/devsu/condor-jwt-keycloak.svg?branch=master)](https://travis-ci.org/devsu/condor-jwt-keycloak)\n[![Coverage Status](https://coveralls.io/repos/github/devsu/condor-jwt-keycloak/badge.svg?branch=master)](https://coveralls.io/github/devsu/condor-jwt-keycloak?branch=master)\n\n**Condor** is a [GRPC Framework for node](https://github.com/devsu/condor-framework).\n\n## Features\n\nThis module extends [condor-jwt](https://github.com/devsu/condor-jwt) and offers additional features for integration with keycloak:\n\n- Handles public key rotation retrieval\n- Allows live token validation (using introspection)\n- Multi-tenancy support, by allowing multiple realms\n\n## Installation\n\n```bash\nnpm i --save condor-framework condor-jwt-keycloak\n```\n\n## How to use\n\nThe JWT middleware decodes and verifies a JsonWebToken passed in the `authorization` header. If the token is valid, `context.token` will be set with the JSON object decoded to be used by later middleware for authorization and access control. (See [condor-authorize](https://github.com/devsu/condor-authorize))\n\n```js\nconst Condor = require('condor-framework');\nconst jwt = require('condor-jwt-keycloak');\nconst Greeter = require('./greeter');\n\nconst options = {\n  'url': 'http://localhost:8080/auth',\n  'realm': 'master',\n};\n\nconst app = new Condor()\n  .addService('./protos/greeter.proto', 'myapp.Greeter', new Greeter())\n  .use(jwt(options))\n  // middleware below this line is only reached if JWT token is valid\n  .use((context, next) =\u003e {\n    console.log('valid token found: ', context.token);\n    next();\n  })\n  .start();\n```\n\n## Options\n\nAllows all the options of the [condor-jwt](https://github.com/devsu/condor-jwt) module. And also:\n\n| Option                     | Description                                                                               | Default |\n|----------------------------|-------------------------------------------------------------------------------------------|---------|\n| url                        | The authorization server URL. E.g. `http://localhost:8080/auth`. Required.                |         |\n| realm                      | The realm name. E.g. `master`. Required unless `allowAnyRealm` is `true`.                 |         |\n| allowAnyRealm              | Allow to authenticate against any realm in the authorization server.                      | false   |\n| minTimeBetweenJwksRequests | How many *milliseconds* should have elapsed before trying to get JWKs from keycloak again | 10000   |\n| introspect                 | Perform live validation using token introspection.                                        | false   |\n| clientId                   | Client ID setup in keycloak. Required when introspect is true.                            |         |\n| clientSecret               | Client secret (can be found in keycloak, under credentials tab). Required when introspect is true.|         |\n\nAdditionaly, you can send any option of the [verify](https://github.com/auth0/node-jsonwebtoken#jwtverifytoken-secretorpublickey-options-callback) method of the [jsonwebtoken](https://github.com/auth0/node-jsonwebtoken). Such options will be used to verify the token.\n\n## License and Credits\n\nMIT License. Copyright 2017 \n\nBuilt by the [GRPC experts](https://devsu.com) at Devsu.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevsu%2Fcondor-jwt-keycloak","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevsu%2Fcondor-jwt-keycloak","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevsu%2Fcondor-jwt-keycloak/lists"}