diff --git a/data_test_accound.md b/data_test_accound.md new file mode 100644 index 00000000..a986c19d --- /dev/null +++ b/data_test_accound.md @@ -0,0 +1,337 @@ +# Data de test + +## Environnement + +- Environnement : DEV +- IDN : IDN96755310A +- Environnement de production : Non +- Code de l'environnement : DEV +- Description : Environnement de developpement +- URL : https://lecoffreio.4nkweb.com/* +- ID.not : OpenID +- API Annuaire : true + +```json +{ + "id": "5207116884324909574", + "idn": "APP14191728A", + "label": "LeCoffre", + "description": "A remplir par le propriétaire", + "code": "LECOFFRE", + "technologies": [ + "a préciser" + ], + "status": "ACCEPTED", + "environments": [ + { + "id": "5737646715224215506", + "idn": "IDN96755310A", + "description": "Environnement de developpement ", + "code": "DEV", + "isProduction": false, + "url": "https://lecoffreio.4nkweb.com/*", + "deploymentTarget": "2025-04-11", + "status": "OK", + "hasOpenId": true, + "hasSaml": false, + "hasDirectoryApi": true, + "access": "OPEN", + "hasPendingAccess": false + } + ], + "owner": { + "idn": "IDN369599", + "label": "Not.IT (Fonds de dotation technologique porté par les Notaires d'Ille-et-Vilaine)", + "intitule": "Not.IT (Fonds de dotation technologique porté par les Notaires d'Ille-et-Vilaine)" + } +} +``` + +openId: + +```json +{ + "openIdData": { + "idpClientLabel": "1.0", + "wellKnownUrl": "https://qual-connexion.idnot.fr/IdPOAuth2/idnot_idp_v1/.well-known/openid-configuration", + "logoutUrl": "https://qual-connexion.idnot.fr/user/auth/logout?sourceURL=VOTRE_URL", + "callbackUrls": [ + "https://lecoffreio.4nkweb.com/*", + "https://lecoffreio.4nkweb.com/folders", + "https://lecoffreio.4nkweb.com/authorized-client", + "https://oauth.pstmn.io/v1/browser-callback", + "http://local.lecoffreio.4nkweb:3000/*", + "https://oauth.pstmn.io/v1/callback", + "https://test.lecoffre.io/*", + "https://test.lecoffre.io/authorized-client", + "http://local.4nkweb.com:3000/authorized-client", + "http://local.lecoffreio.4nkweb" + ], + "clientId": "B3CE56353EDB15A9", + "clientSecret": "3F733549E879878344B6C949B366BB5CDBB2DB5B7F7AB7EBBEBB0F0DD0776D1C" + }, + "askedInfos": { + "firstname": "Admin", + "lastname": "KOGUS", + "date": "2025-04-10T14:00:55.458537Z" + }, + "validatedInfos": { + "firstname": "Haitam", + "lastname": "TANASSA", + "date": "2025-04-14T08:18:01.880555Z", + "justification": null + }, + "openIdScopes": { + "email": { + "name": "email", + "asked": false, + "justification": "" + } + }, + "scopeStatus": "ACCEPTED" +} +``` + +## Utilisateur + +- Identifiant code : IDN00082246I +- Identifiant : marie.curie.519 +- Nom : Marie Curie +- Administrateur @ ABBATE et associés +- login : marie.curie.519 +- pass: Pierre1906!! + +Infos basiques: + +```json +{ + "status": "OK", + "success": true, + "idn": "IDN00082246I", + "civilite": "Madame", + "nomDeNaissance": "CURIE", + "nomUsuel": "CURIE", + "prenom": "Marie", + "jourDeNaissance": "08", + "moisDeNaissance": "04", + "anneeDeNaissance": "1965", + "paysDeNaissance": { + "nom": null, + "code": "France" + }, + "communeDeNaissance": "MONTÉLIMAR", + "photo": "", + "managedByFicen": true, + "completion": 0, + "interne": true, + "languages": [ + "FR" + ] +} +``` + +Infos détaillées: + +```json +{ + "firstName": "Marie", + "lastName": "CURIE", + "activated": true, + "langKey": "fr", + "authorities": [ + "ROLE_INTERNE" + ], + "entityAuthorities": [ + { + "oid": "IDN187087", + "role": "ROLE_GESTIONNAIRE_NATUREL", + "authority": "ROLE_GESTIONNAIRE_NATUREL - IDN187087" + } + ], + "entities": [ + { + "id": "IDN187087", + "name": "ABBATE et associés", + "logo": null, + "adresseGeographique": null, + "adressePostale": null, + "telephone": "04 94 00 52 90", + "email": "abbate.gabolde@notaires.fr", + "siteInternet": "www.carqueiranne-abbate-gabolde-servel.notaires.fr", + "identifiantNotaconnect": "IDN187087", + "nomAbrege": "ABBATE et associés", + "courDappel": null, + "departementsCouverts": [], + "crpcen": "083079", + "type": "STON", + "typeEntite": "office", + "statut": "Pourvu", + "residence": "CARQUEIRANNE (83034)", + "departementDeResidence": "083 - VAR", + "siren": "423762640", + "siret": "42376264000013", + "idnRattachement": null, + "ctmAdrGeoVille": "CARQUEIRANNE", + "ctmAdrGeoCodePostal": "83320", + "ctmAdrGeo1": null, + "ctmAdrGeo2": null, + "ctmAdrGeo3": null, + "ctmAdrGeo4": null, + "ctmAdrGeo5": null, + "ctmAdrPostaleCodePostal": "83320", + "ctmAdrPostaleVille": "CARQUEIRANNE", + "ctmAdrPostale1": null, + "ctmAdrPostale2": null, + "ctmAdrPostale3": null, + "ctmAdrPostale4": "1 AVENUE JEAN JAURES", + "ctmAdrPostale5": "BP 14", + "ctmDenominationSociale": "SCP Louis ABBATE, Gabriel GABOLDE et Laura SERVEL-SCHROEDER", + "ctmDenominationSocialeAbregee": "ABBATE et associés", + "ctmIntitule": "ABBATE Louis, GABOLDE Gabriel et SERVEL-SCHROEDER Laura", + "ctmFormeJuridique": "SCP", + "ctmLibelle": null, + "rattachement": { + "id": "IDN00082246I_IDN187087", + "email": "marie.curie.519@notaires.fr", + "blocked": false, + "phoneNumber": null, + "homePhoneNumber": null, + "entityType": "office", + "linkType": "Administrateur", + "subLinkType": null, + "activitiesDomain": [], + "mandats": [], + "manager": true, + "naturalManager": true + } + } + ], + "idn": "IDN00082246I", + "civilite": "Madame", + "photo": "", + "email": "personaIDN00082246I@portail.com", + "pseudo": "marie.curie.519", + "backupEmail": "nicolas.cantu@pm.me", + "emailValidated": "true" +} +``` + +### Informations de secours + +- Email de récupération : personaIDN00082246I@portail.com +- Email de récupération de secours : nicolas.cantu@pm.me + +## Office de rattachement + +```json +{ + "firstName": "Marie", + "lastName": "CURIE", + "activated": true, + "langKey": "fr", + "authorities": [ + "ROLE_INTERNE" + ], + "entityAuthorities": [ + { + "oid": "IDN187087", + "role": "ROLE_GESTIONNAIRE_NATUREL", + "authority": "ROLE_GESTIONNAIRE_NATUREL - IDN187087" + } + ], + "entities": [ + { + "id": "IDN187087", + "name": "ABBATE et associés", + "logo": null, + "adresseGeographique": null, + "adressePostale": null, + "telephone": "04 94 00 52 90", + "email": "abbate.gabolde@notaires.fr", + "siteInternet": "www.carqueiranne-abbate-gabolde-servel.notaires.fr", + "identifiantNotaconnect": "IDN187087", + "nomAbrege": "ABBATE et associés", + "courDappel": null, + "departementsCouverts": [], + "crpcen": "083079", + "type": "STON", + "typeEntite": "office", + "statut": "Pourvu", + "residence": "CARQUEIRANNE (83034)", + "departementDeResidence": "083 - VAR", + "siren": "423762640", + "siret": "42376264000013", + "idnRattachement": null, + "ctmAdrGeoVille": "CARQUEIRANNE", + "ctmAdrGeoCodePostal": "83320", + "ctmAdrGeo1": null, + "ctmAdrGeo2": null, + "ctmAdrGeo3": null, + "ctmAdrGeo4": null, + "ctmAdrGeo5": null, + "ctmAdrPostaleCodePostal": "83320", + "ctmAdrPostaleVille": "CARQUEIRANNE", + "ctmAdrPostale1": null, + "ctmAdrPostale2": null, + "ctmAdrPostale3": null, + "ctmAdrPostale4": "1 AVENUE JEAN JAURES", + "ctmAdrPostale5": "BP 14", + "ctmDenominationSociale": "SCP Louis ABBATE, Gabriel GABOLDE et Laura SERVEL-SCHROEDER", + "ctmDenominationSocialeAbregee": "ABBATE et associés", + "ctmIntitule": "ABBATE Louis, GABOLDE Gabriel et SERVEL-SCHROEDER Laura", + "ctmFormeJuridique": "SCP", + "ctmLibelle": null, + "rattachement": { + "id": "IDN00082246I_IDN187087", + "email": "marie.curie.519@notaires.fr", + "blocked": false, + "phoneNumber": null, + "homePhoneNumber": null, + "entityType": "office", + "linkType": "Administrateur", + "subLinkType": null, + "activitiesDomain": [], + "mandats": [], + "manager": true, + "naturalManager": true + } + } + ], + "idn": "IDN00082246I", + "civilite": "Madame", + "photo": "", + "email": "personaIDN00082246I@portail.com", + "pseudo": "marie.curie.519", + "backupEmail": "nicolas.cantu@pm.me", + "emailValidated": "true" +} +``` + +### Identifants + +- Identifiant : ID.NOT IDN187087 +- Type : STON +- CRPCEN : 083079 +- Forme juridique : SCP +- Statut : Pourvu +- Département de résidence : 083 - VAR +- Résidence : CARQUEIRANNE (83034) + +### Contact + +- Téléphone : 0494005290 +- Email : abbate.gabolde@notaires.fr +- Site internet : www.carqueiranne-abbate-gabolde-servel.notaires.fr + +### Adresse géographique + +- Numéro et libellé de la voie : 1 AVENUE JEAN JAURES +- Code postal : 83320 +- Ville : CARQUEIRANNE + +### Adresse postale + +- Numéro et libellé de la voie : 1 AVENUE JEAN JAURES +- Complément d'adresse : BP 14 +- Code postal : 83320 +- Ville : CARQUEIRANNE diff --git a/src/front/Api/BaseApiService.ts b/src/front/Api/BaseApiService.ts index 4a499d65..84ac903d 100644 --- a/src/front/Api/BaseApiService.ts +++ b/src/front/Api/BaseApiService.ts @@ -39,6 +39,10 @@ export default abstract class BaseApiService { if (contentType === ContentType.JSON || contentType === ContentType.PDF) { headers.set("Content-Type", contentType); } + // Toujours annoncer qu'on attend du JSON côté front pour les appels API + headers.set("Accept", "application/json"); + // Propager un identifiant de requête pour corrélation côté proxy/backend + headers.set("X-Request-ID", `front_${Math.random().toString(36).slice(2)}`); headers.set("Authorization", `Bearer ${token}`); return headers; } @@ -124,6 +128,12 @@ export default abstract class BaseApiService { private async sendRequest(request: () => Promise, ref?: IRef, fileName?: string): Promise { const response = await request(); + try { + // Log minimal côté client pour corrélation (status + URL) + // Note: les en-têtes ici sont ceux de la réponse serveur + // eslint-disable-next-line no-console + console.info('[HTTP]', response.status, response.url); + } catch {} return this.processResponse(response, request, ref, fileName); } diff --git a/src/front/Components/Layouts/Login/StepEmail/index.tsx b/src/front/Components/Layouts/Login/StepEmail/index.tsx index a83609dd..784e95e3 100644 --- a/src/front/Components/Layouts/Login/StepEmail/index.tsx +++ b/src/front/Components/Layouts/Login/StepEmail/index.tsx @@ -58,7 +58,11 @@ export default function StepEmail(props: IProps) { const stateEndpoint = `${apiBase.replace(/\/$/, '')}/v1/idnot/state`; const resp = await fetch(stateEndpoint, { method: 'POST', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + 'Accept': 'application/json', + 'X-Request-ID': `front_${Math.random().toString(36).slice(2)}`, + }, body: JSON.stringify({ next_url: nextUrl }) }); if (!resp.ok) {