gawati / gawati-portal-ui

Version 2 of the gawati portal
GNU Affero General Public License v3.0
0 stars 0 forks source link

KeyCloak: Front end API library #45

Closed kohsah closed 6 years ago

kohsah commented 6 years ago

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).

kohsah commented 6 years ago

@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