1.2.5 • Published 10 years ago

keycloak-redirect v1.2.5

Weekly downloads
1
License
MIT
Repository
github
Last release
10 years ago

keycloakjs-redirect

Build

Use case

A Frontend Javascript service that integrates with the Keycloak authentication service, guiding users to a login portal when a 401 Unauthorised response is received from an API.

Install

$ npm i keycloak-redirect

Configuration

Import the package, then use the object exposed to return the function authenticate, passing in all mandatory arguments: a config object, a XMLHttpRequest object, and window.

    
   import keycloakRedirect from 'keycloak-redirect';
   
   var config = {
       backend: "http://yourBackendUrl.com",
       clientId: "yourClientId",
       keycloakUrl: "http://yourKeycloakUrl.com"
   };
   
   keycloakRedirect.authenticate(config, new XMLHttpRequest(), $window);

Run Tests

$ npm test

Compile the code with babel

$ npm run compile
1.2.5

10 years ago

1.2.3

10 years ago

1.2.2

10 years ago

1.2.1

10 years ago

1.2.0

10 years ago

1.1.8

10 years ago

1.1.7

10 years ago

1.1.5

10 years ago

1.0.5

10 years ago

1.1.4

10 years ago

1.1.3

10 years ago

1.0.3

10 years ago

1.0.1

10 years ago