@geogirafe/lib-geoportal 1.2.0-dev.2857870396 → 1.2.0-dev.2857926790

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "name": "GeoGirafe PSC",
6
6
  "url": "https://doc.geogirafe.org"
7
7
  },
8
- "version": "1.2.0-dev.2857870396",
8
+ "version": "1.2.0-dev.2857926790",
9
9
  "type": "module",
10
10
  "engines": {
11
11
  "node": ">=20.19.0"
@@ -1 +1 @@
1
- {"version":"1.2.0-dev.2857870396", "build":"2857870396", "date":"17/09/2026"}
1
+ {"version":"1.2.0-dev.2857926790", "build":"2857926790", "date":"17/09/2026"}
@@ -95,7 +95,12 @@ export default class AuthManager extends GirafeSingleton {
95
95
  this.state.oauth.status = 'loginFailed';
96
96
  }
97
97
  }
98
- else if (this.state.oauth.status === 'loggedIn' || this.state.oauth.status === 'loggedOut') {
98
+ else if (this.state.oauth.status === 'loggedIn') {
99
+ this.issuerManager.finalizeLoginWorkflow();
100
+ }
101
+ else if (this.state.oauth.status === 'loggedOut') {
102
+ // Get the anonymous rights
103
+ await this.gmfManager.getAnonymousUserInfo();
99
104
  this.issuerManager.finalizeLoginWorkflow();
100
105
  }
101
106
  else if (this.state.oauth.status === 'loginFailed') {
@@ -9,4 +9,5 @@ export default class GMFManager {
9
9
  loginWithToken(): Promise<void>;
10
10
  logout(): Promise<void>;
11
11
  getUserInfo(): Promise<void>;
12
+ getAnonymousUserInfo(): Promise<void>;
12
13
  }
@@ -61,4 +61,13 @@ export default class GMFManager {
61
61
  const userInfoUrl = this.isOAuth ? this.gmfConfigForOAuth.userInfoUrl : `${this.gmfConfigForGmfAuth.url}loginuser`;
62
62
  this.state.oauth.userInfo = await fetch(userInfoUrl).then((r) => r.json());
63
63
  }
64
+ async getAnonymousUserInfo() {
65
+ console.debug('Auth: 3. Get Anonymous UserInfo');
66
+ const anonymousUserInfoUrl = this.isOAuth
67
+ ? this.gmfConfigForOAuth.anonymousUserInfoUrl
68
+ : `${this.gmfConfigForGmfAuth.url}loginuser`;
69
+ if (anonymousUserInfoUrl) {
70
+ this.state.oauth.userInfo = await fetch(anonymousUserInfoUrl).then((r) => r.json());
71
+ }
72
+ }
64
73
  }
@@ -235,6 +235,7 @@ declare class GirafeConfig {
235
235
  };
236
236
  geomapfish: {
237
237
  userInfoUrl: string;
238
+ anonymousUserInfoUrl?: string;
238
239
  loginUrl: string;
239
240
  logoutUrl: string;
240
241
  anonymousUsername: string;
@@ -450,6 +450,7 @@ class GirafeConfig {
450
450
  };
451
451
  const geomapfishConfig = {
452
452
  userInfoUrl: config.oauth.geomapfish.userInfoUrl,
453
+ anonymousUserInfoUrl: config.oauth.geomapfish.anonymousUserInfoUrl,
453
454
  loginUrl: config.oauth.geomapfish.loginUrl,
454
455
  logoutUrl: config.oauth.geomapfish.logoutUrl,
455
456
  anonymousUsername: config.oauth.geomapfish.anonymousUsername,