The current use of KeyCloak in client front-ends is by directly using the keycloak-js library, and using browser localstorage for caching authentication related metadata. We need to abstract this into a front-end JS library so every implementing client does not have to directly call the keycloak-js library or interact directly with localstorage. This abstraction protects applications using the API from changes in the keycloak API and from changes to the way authentication metadata is cached in the client (e.g. if we move in the future from localstorage to something else we don't have to reimplement every application using gawati keycloak authentication).
@surajpt currently the API can only be used to check if logged in or not. We cannot for instance determine roles of the logged in user Such an API needs to be added
The current use of KeyCloak in client front-ends is by directly using the keycloak-js library, and using browser localstorage for caching authentication related metadata. We need to abstract this into a front-end JS library so every implementing client does not have to directly call the keycloak-js library or interact directly with localstorage. This abstraction protects applications using the API from changes in the keycloak API and from changes to the way authentication metadata is cached in the client (e.g. if we move in the future from localstorage to something else we don't have to reimplement every application using gawati keycloak authentication).