1.1.1 • Published 1 year ago

@nivalit/keycloak-js-provider v1.1.1

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

Nivalit - Keycloak JS Provider

Simple Facade for simplify the authorization integration with keycloak identity provider.

Quick Start

For React Single Page Applications just use following snippet:

index.tsx

new KeycloakAuthBuilder(
  'http://authServerUrl:PORT',
  'clientId',
  'realmName',
  () =>
    ReactDOM.render(
      <React.StrictMode>
        <App />
      </React.StrictMode>,
      document.getElementById('root')
    )
)
  .addPublicPath('/signup')
  .build()
  .init()

Usage in code

Keycloak Authorization Service is a singleton instance that provides basic methods such as logout(), hasClientRoles(), getProfile() and isLoggedIn(). You can use it just from service instance in any place in code.

KeycloakAuthService.getInstance().logout()
1.1.1

1 year ago

1.1.0

1 year ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.0.1-beta.4

2 years ago

0.0.1-beta.3

2 years ago

0.0.1-beta.2

2 years ago