ProtectedredirectThe RedirectUrl has to be the same for all call to the issuer Because the authentication is given for a specific redirectUrl. Therefore, we keep it in localStorage.
ProtectedstateProtectedgetProtectedgetProtectedloadProtectedloggedProtectedloggedProtectedresetProtectedsave
For diverse reasons, this could NOT be done using the oAuth2 mechanisms of GMF:
For all those reasons, we cannot use the geomapfish oAuth process Instead we delegate the login to the backend, which is a Backend-For-Frontend (BFF) pattern: the frontend only ever holds a session cookie, and never needs any OIDC-specific configuration (no clientId, no issuer url) -- the identity provider is only known to the backend.
Two
gmfauth.loginModeflavors are supported, both delegating entirely to the backend:authentication.openid_connectenabled: the browser never talks to the identity provider directly, and gg-viewer needs no more configuration for this mode than for 'form'.Once the redirect comes back (either flavor), everything below is identical: we only ever trust the session cookie and poll the backend's loginuser endpoint to know who is logged in.
NOTE: If the geogirafe client is not running on the same domain as the GMF backend, the GMF Backend needs to be configured with :