keycloak-express-middleware 4.1.0 → 4.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +4 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -382,10 +382,10 @@ app.listen(PORT, () => {
382
382
  ## 🧩 Configuration
383
383
  In your Express application:
384
384
  ```js
385
- import keycloakAdapter from 'keycloak-express-middleware';
385
+ import keycloakAdapterClass from 'keycloak-express-middleware';
386
386
 
387
387
  // Configure and Initialize Keycloak adapter
388
- keycloackAdapter.configure(app,{
388
+ keycloackAdapter=new keycloakAdapterClass(app,{
389
389
  "realm": "Realm-Project",
390
390
  "auth-server-url": "https://YourKeycloakUrl:30040/",
391
391
  "ssl-required": "external",
@@ -401,12 +401,12 @@ keycloackAdapter.configure(app,{
401
401
  }
402
402
  })
403
403
  ```
404
- `keycloackAdapter.configure` is a configuration function for the Keycloak
404
+ `keycloak-express-middleware constructor` instantiate and configure the object for the Keycloak
405
405
  adapter in an Express application. It must be called at app startup, before defining any protected routes.
406
406
  It is an async function and returns a promise
407
407
 
408
408
  **` -- @parameters -- `**
409
- - **app**: `[required]` Express application instance (e.g., const app = express();)
409
+ - **app**: `[required]` Express application instance (e.g., const app = express();) or express router (e.g., var router = express.Router();)
410
410
  - **keyCloakConfig:** `[required]`JSON object containing the Keycloak client configuration. This can be obtained from the Keycloak admin console: Clients → [client name] → Installation → "Keycloak OIDC JSON" → Download. It accepts other parameter not defined in downloaded config like:
411
411
  - "verifyTokenAudience": If verify-token-audience = true, the adapter rejects the token if its audience does not match the client that receives it.
412
412
  - "bearerOnly": for public client. if it is set to true the client cannot call login services
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "keycloak-express-middleware",
3
- "version": "4.1.0",
3
+ "version": "4.1.1",
4
4
  "description": "Adapter API to integrate Node.js (Express) applications with Keycloak. Provides middleware for authentication, authorization, token validation, and route protection via OpenID Connect.",
5
5
  "main": "index.js",
6
6
  "scripts": {