1.2.5 • Published 8 years ago

keycloak-redirect v1.2.5

Weekly downloads
1
License
MIT
Repository
github
Last release
8 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

8 years ago

1.2.3

8 years ago

1.2.2

8 years ago

1.2.1

8 years ago

1.2.0

8 years ago

1.1.8

8 years ago

1.1.7

8 years ago

1.1.5

8 years ago

1.0.5

8 years ago

1.1.4

8 years ago

1.1.3

8 years ago

1.0.3

8 years ago

1.0.1

8 years ago