yeta1990 / ft_transcendence

1 stars 1 forks source link

Autenticación de usuarios/Oauth2/API 42 #23

Open yeta1990 opened 1 year ago

yeta1990 commented 1 year ago

Creo que lo mejor es que cada uno de los 3 nos hagamos una aplicación en 42 para tener 3 tokens distintos con los que hacer pruebas: https://profile.intra.42.fr/oauth/applications/new

AVISO: no debemos hacer push de las claves al repositorio de github, solo al de 42 cuando vayamos a corregir

Proceso de autenticación de usuarios via OAuth2 estandar

Image

Autenticación en Nest

Dos opciones: nativo o con Passport. No veo las ventajas de usar Passport para nuestro caso, así que tiraría por lo nativo. En cualquier caso la implementación es muy parecida, solo que Passport ya tiene su propio servicio AuthGuard

Almacenar token de sesión y enviarlo en cada nueva petición en Angular

yeta1990 commented 1 year ago

Datos del usuario que obtenemos de 42

curl -H "Authorization: Bearer {token}" https://api.intra.42.fr/v2/me

Versión simplificada

{
  "id": 95616,
  "email": "albgarci@student.42madrid.com",
  "login": "albgarci",
  "first_name": "Alberto",
  "last_name": "García lópez",
  "usual_full_name": "Alberto García López",
  "usual_first_name": null,
  "url": "https://api.intra.42.fr/v2/users/albgarci",
  "phone": "hidden",
  "displayname": "Alberto García López",
  "kind": "student",
  "image": {
    "link": "https://cdn.intra.42.fr/users/6656095675a0ec6cbb92fa9ffe9697ad/albgarci.jpg",
    "versions": {
      "large": "https://cdn.intra.42.fr/users/1fbc41401dd36fe6690ae1a94ee2d8f8/large_albgarci.jpg",
      "medium": "https://cdn.intra.42.fr/users/9575c0c0651fde1df34efd76de001349/medium_albgarci.jpg",
      "small": "https://cdn.intra.42.fr/users/5efc9e23c4102747b0c7687c7ec94db5/small_albgarci.jpg",
      "micro": "https://cdn.intra.42.fr/users/97f73e60814d7c50de172f59aa0bbe56/micro_albgarci.jpg"
    }
  },
  "staff?": false,
  "correction_point": 7,
  "pool_month": "august",
  "pool_year": "2021",
  "location": null,
  "wallet": 165,
  "anonymize_date": "2026-04-03T00:00:00.000+02:00",
  "data_erasure_date": "2026-04-03T00:00:00.000+02:00",
  "created_at": "2021-08-02T08:19:54.969Z",
  "updated_at": "2023-03-29T17:18:59.750Z",
  "alumnized_at": null,
  "alumni?": false,
  "active?": true,
}
El json entero ``` javascript { "id": 95616, "email": "albgarci@student.42madrid.com", "login": "albgarci", "first_name": "Alberto", "last_name": "García lópez", "usual_full_name": "Alberto García López", "usual_first_name": null, "url": "https://api.intra.42.fr/v2/users/albgarci", "phone": "hidden", "displayname": "Alberto García López", "kind": "student", "image": { "link": "https://cdn.intra.42.fr/users/6656095675a0ec6cbb92fa9ffe9697ad/albgarci.jpg", "versions": { "large": "https://cdn.intra.42.fr/users/1fbc41401dd36fe6690ae1a94ee2d8f8/large_albgarci.jpg", "medium": "https://cdn.intra.42.fr/users/9575c0c0651fde1df34efd76de001349/medium_albgarci.jpg", "small": "https://cdn.intra.42.fr/users/5efc9e23c4102747b0c7687c7ec94db5/small_albgarci.jpg", "micro": "https://cdn.intra.42.fr/users/97f73e60814d7c50de172f59aa0bbe56/micro_albgarci.jpg" } }, "staff?": false, "correction_point": 7, "pool_month": "august", "pool_year": "2021", "location": null, "wallet": 165, "anonymize_date": "2026-04-03T00:00:00.000+02:00", "data_erasure_date": "2026-04-03T00:00:00.000+02:00", "created_at": "2021-08-02T08:19:54.969Z", "updated_at": "2023-03-29T17:18:59.750Z", "alumnized_at": null, "alumni?": false, "active?": true, "groups": [ { "id": 91, "name": "mentor" } ], "cursus_users": [ { "grade": null, "level": 9.68, "skills": [ { "id": 4, "name": "Unix", "level": 10.21 }, { "id": 1, "name": "Algorithms & AI", "level": 7.52 }, { "id": 3, "name": "Rigor", "level": 7.05 }, { "id": 14, "name": "Adaptation & creativity", "level": 6.11 }, { "id": 7, "name": "Group & interpersonal", "level": 2.44 } ], "blackholed_at": null, "id": 132715, "begin_at": "2021-08-02T08:20:56.000Z", "end_at": "2021-08-27T21:42:00.000Z", "cursus_id": 9, "has_coalition": true, "created_at": "2021-08-02T08:19:56.484Z", "updated_at": "2021-08-02T08:19:56.484Z", "user": { "id": 95616, "email": "albgarci@student.42madrid.com", "login": "albgarci", "first_name": "Alberto", "last_name": "García lópez", "usual_full_name": "Alberto García López", "usual_first_name": null, "url": "https://api.intra.42.fr/v2/users/albgarci", "phone": "hidden", "displayname": "Alberto García López", "kind": "student", "image": { "link": "https://cdn.intra.42.fr/users/6656095675a0ec6cbb92fa9ffe9697ad/albgarci.jpg", "versions": { "large": "https://cdn.intra.42.fr/users/1fbc41401dd36fe6690ae1a94ee2d8f8/large_albgarci.jpg", "medium": "https://cdn.intra.42.fr/users/9575c0c0651fde1df34efd76de001349/medium_albgarci.jpg", "small": "https://cdn.intra.42.fr/users/5efc9e23c4102747b0c7687c7ec94db5/small_albgarci.jpg", "micro": "https://cdn.intra.42.fr/users/97f73e60814d7c50de172f59aa0bbe56/micro_albgarci.jpg" } }, "staff?": false, "correction_point": 7, "pool_month": "august", "pool_year": "2021", "location": null, "wallet": 165, "anonymize_date": "2026-04-03T00:00:00.000+02:00", "data_erasure_date": "2026-04-03T00:00:00.000+02:00", "created_at": "2021-08-02T08:19:54.969Z", "updated_at": "2023-03-29T17:18:59.750Z", "alumnized_at": null, "alumni?": false, "active?": true }, "cursus": { "id": 9, "created_at": "2015-11-04T10:58:13.979Z", "name": "C Piscine", "slug": "c-piscine", "kind": "piscine" } }, { "grade": "Learner", "level": 8.57, "skills": [ { "id": 10, "name": "Network & system administration", "level": 7.47 }, { "id": 3, "name": "Rigor", "level": 6.95 }, { "id": 17, "name": "Object-oriented programming", "level": 6.35 }, { "id": 2, "name": "Imperative programming", "level": 4.5600000000000005 }, { "id": 4, "name": "Unix", "level": 4.38 }, { "id": 1, "name": "Algorithms & AI", "level": 4 }, { "id": 5, "name": "Graphics", "level": 3.07 } ], "blackholed_at": "2024-06-10T10:00:00.000Z", "id": 135662, "begin_at": "2021-09-13T10:00:00.000Z", "end_at": null, "cursus_id": 21, "has_coalition": true, "created_at": "2021-08-31T14:32:57.454Z", "updated_at": "2021-08-31T14:32:57.454Z", "user": { "id": 95616, "email": "albgarci@student.42madrid.com", "login": "albgarci", "first_name": "Alberto", "last_name": "García lópez", "usual_full_name": "Alberto García López", "usual_first_name": null, "url": "https://api.intra.42.fr/v2/users/albgarci", "phone": "hidden", "displayname": "Alberto García López", "kind": "student", "image": { "link": "https://cdn.intra.42.fr/users/6656095675a0ec6cbb92fa9ffe9697ad/albgarci.jpg", "versions": { "large": "https://cdn.intra.42.fr/users/1fbc41401dd36fe6690ae1a94ee2d8f8/large_albgarci.jpg", "medium": "https://cdn.intra.42.fr/users/9575c0c0651fde1df34efd76de001349/medium_albgarci.jpg", "small": "https://cdn.intra.42.fr/users/5efc9e23c4102747b0c7687c7ec94db5/small_albgarci.jpg", "micro": "https://cdn.intra.42.fr/users/97f73e60814d7c50de172f59aa0bbe56/micro_albgarci.jpg" } }, "staff?": false, "correction_point": 7, "pool_month": "august", "pool_year": "2021", "location": null, "wallet": 165, "anonymize_date": "2026-04-03T00:00:00.000+02:00", "data_erasure_date": "2026-04-03T00:00:00.000+02:00", "created_at": "2021-08-02T08:19:54.969Z", "updated_at": "2023-03-29T17:18:59.750Z", "alumnized_at": null, "alumni?": false, "active?": true }, "cursus": { "id": 21, "created_at": "2019-07-29T08:45:17.896Z", "name": "42cursus", "slug": "42cursus", "kind": "main" } } ], "projects_users": [ { "id": 3025911, "occurrence": 0, "final_mark": 0, "status": "finished", "validated?": false, "current_team_id": 4753096, "project": { "id": 1324, "name": "Exam Rank 06", "slug": "exam-rank-06", "parent_id": null }, "cursus_ids": [ 21 ], "marked_at": "2023-03-16T10:00:44.288Z", "marked": true, "retriable_at": "2023-03-16T10:00:44.315Z", "created_at": "2023-03-13T16:31:19.249Z", "updated_at": "2023-03-16T13:00:10.952Z" }, { "id": 3028772, "occurrence": 0, "final_mark": null, "status": "searching_a_group", "validated?": null, "current_team_id": null, "project": { "id": 2125, "name": "Exam atonement", "slug": "exam-atonement", "parent_id": null }, "cursus_ids": [ 21 ], "marked_at": null, "marked": false, "retriable_at": null, "created_at": "2023-03-15T07:18:51.887Z", "updated_at": "2023-03-15T07:18:51.887Z" }, { "id": 2682691, "occurrence": 0, "final_mark": 125, "status": "finished", "validated?": true, "current_team_id": 4260756, "project": { "id": 1335, "name": "ft_containers", "slug": "ft_containers", "parent_id": null }, "cursus_ids": [ 21 ], "marked_at": "2023-03-13T16:30:43.044Z", "marked": true, "retriable_at": "2023-03-16T16:30:43.268Z", "created_at": "2022-07-21T17:21:03.621Z", "updated_at": "2023-03-13T16:30:43.285Z" }, { "id": 2768301, "occurrence": 1, "final_mark": 100, "status": "finished", "validated?": true, "current_team_id": 4596371, "project": { "id": 1323, "name": "Exam Rank 05", "slug": "exam-rank-05", "parent_id": null }, "cursus_ids": [ 21 ], "marked_at": "2022-12-15T11:34:58.877Z", "marked": true, "retriable_at": "2022-12-15T11:34:59.031Z", "created_at": "2022-09-06T08:47:25.425Z", "updated_at": "2022-12-15T11:35:07.819Z" }, { "id": 2771306, "occurrence": 0, "final_mark": 115, "status": "finished", "validated?": true, "current_team_id": 4394327, "project": { "id": 1336, "name": "ft_irc", "slug": "ft_irc", "parent_id": null }, "cursus_ids": [ 21 ], "marked_at": "2022-12-14T13:38:35.251Z", "marked": true, "retriable_at": "2022-12-17T13:38:35.481Z", "created_at": "2022-09-07T14:32:45.286Z", "updated_at": "2022-12-14T13:38:35.678Z" }, { "id": 2682690, "occurrence": 0, "final_mark": 100, "status": "finished", "validated?": true, "current_team_id": 4260755, "project": { "id": 1983, "name": "Inception", "slug": "inception", "parent_id": null }, "cursus_ids": [ 21 ], "marked_at": "2022-09-19T19:08:22.272Z", "marked": true, "retriable_at": "2022-09-22T19:08:22.463Z", "created_at": "2022-07-21T17:20:57.287Z", "updated_at": "2022-09-19T19:08:22.476Z" }, { "id": 2670435, "occurrence": 0, "final_mark": 100, "status": "finished", "validated?": true, "current_team_id": 4243302, "project": { "id": 1346, "name": "CPP Module 08", "slug": "cpp-module-08", "parent_id": null }, "cursus_ids": [ 21 ], "marked_at": "2022-07-21T17:19:30.782Z", "marked": true, "retriable_at": "2022-07-24T17:19:31.015Z", "created_at": "2022-07-16T22:48:03.799Z", "updated_at": "2022-07-21T17:19:31.027Z" }, { "id": 2484020, "occurrence": 0, "final_mark": 100, "status": "finished", "validated?": true, "current_team_id": 3983896, "project": { "id": 2007, "name": "NetPractice", "slug": "netpractice", "parent_id": null }, "cursus_ids": [ 21 ], "marked_at": "2022-07-17T19:43:48.001Z", "marked": true, "retriable_at": "2022-07-18T19:43:48.281Z", "created_at": "2022-02-05T12:52:23.049Z", "updated_at": "2022-07-17T19:43:48.306Z" }, { "id": 2670347, "occurrence": 0, "final_mark": 100, "status": "finished", "validated?": true, "current_team_id": 4243157, "project": { "id": 1345, "name": "CPP Module 07", "slug": "cpp-module-07", "parent_id": null }, "cursus_ids": [ 21 ], "marked_at": "2022-07-16T22:47:44.929Z", "marked": true, "retriable_at": "2022-07-19T22:47:44.956Z", "created_at": "2022-07-16T19:13:47.635Z", "updated_at": "2022-07-16T22:47:44.988Z" }, { "id": 2644915, "occurrence": 0, "final_mark": 80, "status": "finished", "validated?": true, "current_team_id": 4209482, "project": { "id": 1344, "name": "CPP Module 06", "slug": "cpp-module-06", "parent_id": null }, "cursus_ids": [ 21 ], "marked_at": "2022-07-16T19:13:28.262Z", "marked": true, "retriable_at": "2022-07-19T19:13:28.298Z", "created_at": "2022-07-03T18:37:39.524Z", "updated_at": "2022-07-16T19:13:28.323Z" }, { "id": 2553902, "occurrence": 0, "final_mark": 100, "status": "finished", "validated?": true, "current_team_id": 4085029, "project": { "id": 1343, "name": "CPP Module 05", "slug": "cpp-module-05", "parent_id": null }, "cursus_ids": [ 21 ], "marked_at": "2022-07-03T18:37:06.262Z", "marked": true, "retriable_at": "2022-07-06T18:37:06.297Z", "created_at": "2022-04-06T17:58:40.476Z", "updated_at": "2022-07-03T18:37:06.317Z" }, { "id": 2538391, "occurrence": 0, "final_mark": 103, "status": "finished", "validated?": true, "current_team_id": 4062374, "project": { "id": 1326, "name": "cub3d", "slug": "cub3d", "parent_id": null }, "cursus_ids": [ 21 ], "marked_at": "2022-07-02T16:28:47.418Z", "marked": true, "retriable_at": "2022-07-05T16:28:47.732Z", "created_at": "2022-03-22T19:23:35.788Z", "updated_at": "2022-07-02T16:28:48.080Z" }, { "id": 2552506, "occurrence": 0, "final_mark": 100, "status": "finished", "validated?": true, "current_team_id": 4083241, "project": { "id": 1342, "name": "CPP Module 04", "slug": "cpp-module-04", "parent_id": null }, "cursus_ids": [ 21 ], "marked_at": "2022-04-06T17:58:00.302Z", "marked": true, "retriable_at": "2022-04-09T17:58:00.330Z", "created_at": "2022-04-05T18:59:06.105Z", "updated_at": "2022-04-06T17:58:00.346Z" }, { "id": 2535077, "occurrence": 0, "final_mark": 80, "status": "finished", "validated?": true, "current_team_id": 4057367, "project": { "id": 1340, "name": "CPP Module 02", "slug": "cpp-module-02", "parent_id": null }, "cursus_ids": [ 21 ], "marked_at": "2022-03-18T18:10:54.698Z", "marked": true, "retriable_at": "2022-03-21T18:10:54.726Z", "created_at": "2022-03-18T12:23:35.277Z", "updated_at": "2022-03-18T18:10:54.744Z" }, { "id": 2521656, "occurrence": 0, "final_mark": 100, "status": "finished", "validated?": true, "current_team_id": 4039513, "project": { "id": 1339, "name": "CPP Module 01", "slug": "cpp-module-01", "parent_id": null }, "cursus_ids": [ 21 ], "marked_at": "2022-03-18T12:23:04.644Z", "marked": true, "retriable_at": "2022-03-21T12:23:04.674Z", "created_at": "2022-03-03T15:28:23.402Z", "updated_at": "2022-03-18T12:23:04.701Z" }, { "id": 2521073, "occurrence": 1, "final_mark": 100, "status": "finished", "validated?": true, "current_team_id": 4058640, "project": { "id": 1322, "name": "Exam Rank 04", "slug": "exam-rank-04", "parent_id": null }, "cursus_ids": [ 21 ], "marked_at": "2022-03-24T09:49:43.969Z", "marked": true, "retriable_at": "2022-03-24T09:49:44.064Z", "created_at": "2022-03-03T09:51:06.168Z", "updated_at": "2022-03-24T09:49:50.627Z" }, { "id": 2484023, "occurrence": 0, "final_mark": 84, "status": "finished", "validated?": true, "current_team_id": 3983899, "project": { "id": 1338, "name": "CPP Module 00", "slug": "cpp-module-00", "parent_id": null }, "cursus_ids": [ 21 ], "marked_at": "2022-03-02T17:05:58.729Z", "marked": true, "retriable_at": "2022-03-05T17:05:58.764Z", "created_at": "2022-02-05T12:53:19.490Z", "updated_at": "2022-03-02T17:05:58.785Z" }, { "id": 2435324, "occurrence": 1, "final_mark": 100, "status": "finished", "validated?": true, "current_team_id": 3982529, "project": { "id": 1334, "name": "Philosophers", "slug": "42cursus-philosophers", "parent_id": null }, "cursus_ids": [ 21 ], "marked_at": "2022-02-05T12:40:25.204Z", "marked": true, "retriable_at": "2022-02-08T12:40:25.736Z", "created_at": "2021-12-09T12:36:22.325Z", "updated_at": "2022-02-05T12:40:25.778Z" }, { "id": 2420728, "occurrence": 1, "final_mark": 100, "status": "finished", "validated?": true, "current_team_id": 3899579, "project": { "id": 1321, "name": "Exam Rank 03", "slug": "exam-rank-03", "parent_id": null }, "cursus_ids": [ 21 ], "marked_at": "2021-12-02T10:45:29.623Z", "marked": true, "retriable_at": "2021-12-02T10:45:29.654Z", "created_at": "2021-11-25T11:17:04.571Z", "updated_at": "2021-12-02T10:45:36.348Z" }, { "id": 2412382, "occurrence": 0, "final_mark": 97, "status": "finished", "validated?": true, "current_team_id": 3887907, "project": { "id": 1331, "name": "minishell", "slug": "42cursus-minishell", "parent_id": null }, "cursus_ids": [ 21 ], "marked_at": "2022-02-04T17:31:33.020Z", "marked": true, "retriable_at": "2022-02-07T17:31:33.431Z", "created_at": "2021-11-19T12:21:08.855Z", "updated_at": "2022-02-04T17:31:33.742Z" }, { "id": 2397432, "occurrence": 0, "final_mark": 80, "status": "finished", "validated?": true, "current_team_id": 3867648, "project": { "id": 2008, "name": "FdF", "slug": "42cursus-fdf", "parent_id": null }, "cursus_ids": [ 21 ], "marked_at": "2021-11-24T15:18:47.078Z", "marked": true, "retriable_at": "2021-11-27T15:18:47.375Z", "created_at": "2021-11-03T08:54:11.879Z", "updated_at": "2021-11-24T15:18:47.397Z" }, { "id": 2385833, "occurrence": 1, "final_mark": 115, "status": "finished", "validated?": true, "current_team_id": 3870773, "project": { "id": 2004, "name": "pipex", "slug": "pipex", "parent_id": null }, "cursus_ids": [ 21 ], "marked_at": "2021-11-05T12:41:05.915Z", "marked": true, "retriable_at": "2021-11-08T12:41:06.233Z", "created_at": "2021-10-21T17:38:16.034Z", "updated_at": "2021-11-05T12:41:06.250Z" }, { "id": 2380729, "occurrence": 0, "final_mark": 107, "status": "finished", "validated?": true, "current_team_id": 3843966, "project": { "id": 1471, "name": "push_swap", "slug": "42cursus-push_swap", "parent_id": null }, "cursus_ids": [ 21 ], "marked_at": "2021-10-21T17:13:46.929Z", "marked": true, "retriable_at": "2021-10-24T17:13:47.241Z", "created_at": "2021-10-18T10:13:19.098Z", "updated_at": "2021-10-21T17:13:47.266Z" }, { "id": 2376120, "occurrence": 2, "final_mark": 100, "status": "finished", "validated?": true, "current_team_id": 3843967, "project": { "id": 1320, "name": "Exam Rank 02", "slug": "exam-rank-02", "parent_id": null }, "cursus_ids": [ 21 ], "marked_at": "2021-10-21T09:05:55.574Z", "marked": true, "retriable_at": "2021-10-21T09:05:55.598Z", "created_at": "2021-10-13T19:04:10.771Z", "updated_at": "2021-10-21T09:06:07.592Z" }, { "id": 2366357, "occurrence": 0, "final_mark": 100, "status": "finished", "validated?": true, "current_team_id": 3823652, "project": { "id": 1316, "name": "ft_printf", "slug": "42cursus-ft_printf", "parent_id": null }, "cursus_ids": [ 21 ], "marked_at": "2021-10-13T19:03:50.322Z", "marked": true, "retriable_at": "2021-10-14T19:03:50.430Z", "created_at": "2021-10-05T07:58:42.745Z", "updated_at": "2021-10-13T19:03:50.444Z" }, { "id": 2358674, "occurrence": 0, "final_mark": 100, "status": "finished", "validated?": true, "current_team_id": 3812461, "project": { "id": 1327, "name": "get_next_line", "slug": "42cursus-get_next_line", "parent_id": null }, "cursus_ids": [ 21 ], "marked_at": "2021-10-13T15:35:06.760Z", "marked": true, "retriable_at": "2021-10-14T15:35:06.970Z", "created_at": "2021-09-28T17:14:59.983Z", "updated_at": "2021-10-13T15:35:06.989Z" }, { "id": 2350979, "occurrence": 0, "final_mark": 100, "status": "finished", "validated?": true, "current_team_id": 3799790, "project": { "id": 1994, "name": "Born2beroot", "slug": "born2beroot", "parent_id": null }, "cursus_ids": [ 21 ], "marked_at": "2021-09-28T17:11:56.036Z", "marked": true, "retriable_at": "2021-09-29T17:11:56.275Z", "created_at": "2021-09-22T17:52:08.668Z", "updated_at": "2021-09-28T17:11:56.290Z" }, { "id": 2336686, "occurrence": 2, "final_mark": 112, "status": "finished", "validated?": true, "current_team_id": 3799126, "project": { "id": 1314, "name": "Libft", "slug": "42cursus-libft", "parent_id": null }, "cursus_ids": [ 21 ], "marked_at": "2021-09-22T17:45:58.581Z", "marked": true, "retriable_at": "2021-09-23T17:45:58.990Z", "created_at": "2021-09-13T10:25:33.543Z", "updated_at": "2021-09-22T17:45:59.005Z" }, { "id": 2310122, "occurrence": 0, "final_mark": 0, "status": "finished", "validated?": false, "current_team_id": 3745910, "project": { "id": 1264, "name": "C Piscine C 08", "slug": "c-piscine-c-08", "parent_id": null }, "cursus_ids": [ 9 ], "marked_at": "2021-08-27T17:48:31.417Z", "marked": true, "retriable_at": "2021-08-27T18:08:31.436Z", "created_at": "2021-08-24T19:05:42.881Z", "updated_at": "2021-08-27T17:48:31.451Z" }, { "id": 2309435, "occurrence": 0, "final_mark": 72, "status": "finished", "validated?": true, "current_team_id": 3744883, "project": { "id": 1304, "name": "C Piscine Final Exam", "slug": "c-piscine-final-exam", "parent_id": null }, "cursus_ids": [ 9 ], "marked_at": "2021-08-27T13:19:00.984Z", "marked": true, "retriable_at": null, "created_at": "2021-08-24T14:12:21.835Z", "updated_at": "2021-08-27T15:59:18.331Z" }, { "id": 2303761, "occurrence": 0, "final_mark": 100, "status": "finished", "validated?": true, "current_team_id": 3735826, "project": { "id": 1305, "name": "C Piscine BSQ", "slug": "c-piscine-bsq", "parent_id": null }, "cursus_ids": [ 9 ], "marked_at": "2021-08-27T16:07:30.867Z", "marked": true, "retriable_at": null, "created_at": "2021-08-20T09:31:01.092Z", "updated_at": "2021-08-27T16:07:31.215Z" }, { "id": 2303610, "occurrence": 2, "final_mark": 45, "status": "finished", "validated?": false, "current_team_id": 3750281, "project": { "id": 1270, "name": "C Piscine C 07", "slug": "c-piscine-c-07", "parent_id": null }, "cursus_ids": [ 9 ], "marked_at": "2021-08-25T08:55:36.570Z", "marked": true, "retriable_at": "2021-08-26T18:59:52.449Z", "created_at": "2021-08-20T07:57:58.095Z", "updated_at": "2021-08-26T17:59:52.514Z" }, { "id": 2300765, "occurrence": 0, "final_mark": 100, "status": "finished", "validated?": true, "current_team_id": 3731835, "project": { "id": 1263, "name": "C Piscine C 06", "slug": "c-piscine-c-06", "parent_id": null }, "cursus_ids": [ 9 ], "marked_at": "2021-08-19T14:34:09.072Z", "marked": true, "retriable_at": "2021-08-19T14:54:09.137Z", "created_at": "2021-08-18T14:10:18.941Z", "updated_at": "2021-08-19T14:34:09.152Z" }, { "id": 2298902, "occurrence": 0, "final_mark": 90, "status": "finished", "validated?": true, "current_team_id": 3736595, "project": { "id": 1309, "name": "C Piscine Rush 02", "slug": "c-piscine-rush-02", "parent_id": null }, "cursus_ids": [ 9 ], "marked_at": "2021-08-25T11:46:10.443Z", "marked": true, "retriable_at": null, "created_at": "2021-08-18T06:28:46.234Z", "updated_at": "2021-08-25T11:46:10.898Z" }, { "id": 2298900, "occurrence": 0, "final_mark": 100, "status": "finished", "validated?": true, "current_team_id": 3729904, "project": { "id": 1303, "name": "C Piscine Exam 02", "slug": "c-piscine-exam-02", "parent_id": null }, "cursus_ids": [ 9 ], "marked_at": "2021-08-20T17:57:17.917Z", "marked": true, "retriable_at": null, "created_at": "2021-08-18T06:28:31.719Z", "updated_at": "2021-08-20T17:57:34.340Z" }, { "id": 2297135, "occurrence": 1, "final_mark": 60, "status": "finished", "validated?": true, "current_team_id": 3735780, "project": { "id": 1262, "name": "C Piscine C 05", "slug": "c-piscine-c-05", "parent_id": null }, "cursus_ids": [ 9 ], "marked_at": "2021-08-18T11:51:40.962Z", "marked": true, "retriable_at": "2021-08-20T12:36:11.804Z", "created_at": "2021-08-17T10:44:43.240Z", "updated_at": "2021-08-20T11:56:11.823Z" }, { "id": 2294931, "occurrence": 2, "final_mark": 85, "status": "finished", "validated?": true, "current_team_id": 3735029, "project": { "id": 1261, "name": "C Piscine C 04", "slug": "c-piscine-c-04", "parent_id": null }, "cursus_ids": [ 9 ], "marked_at": "2021-08-20T11:49:32.838Z", "marked": true, "retriable_at": "2021-08-20T12:49:32.910Z", "created_at": "2021-08-16T08:37:26.268Z", "updated_at": "2021-08-20T11:49:32.924Z" }, { "id": 2288935, "occurrence": 1, "final_mark": 100, "status": "finished", "validated?": true, "current_team_id": 3728469, "project": { "id": 1260, "name": "C Piscine C 03", "slug": "c-piscine-c-03", "parent_id": null }, "cursus_ids": [ 9 ], "marked_at": "2021-08-17T18:28:41.102Z", "marked": true, "retriable_at": "2021-08-17T19:08:41.180Z", "created_at": "2021-08-11T14:13:36.584Z", "updated_at": "2021-08-17T18:28:41.195Z" }, { "id": 2287019, "occurrence": 0, "final_mark": 0, "status": "finished", "validated?": false, "current_team_id": 3720177, "project": { "id": 1310, "name": "C Piscine Rush 01", "slug": "c-piscine-rush-01", "parent_id": null }, "cursus_ids": [ 9 ], "marked_at": "2021-08-18T16:08:28.400Z", "marked": true, "retriable_at": null, "created_at": "2021-08-10T20:09:37.097Z", "updated_at": "2021-08-18T16:08:28.627Z" }, { "id": 2287018, "occurrence": 0, "final_mark": 80, "status": "finished", "validated?": true, "current_team_id": 3713938, "project": { "id": 1302, "name": "C Piscine Exam 01", "slug": "c-piscine-exam-01", "parent_id": null }, "cursus_ids": [ 9 ], "marked_at": "2021-08-13T17:19:15.966Z", "marked": true, "retriable_at": null, "created_at": "2021-08-10T20:09:24.197Z", "updated_at": "2021-08-13T17:48:12.749Z" }, { "id": 2285822, "occurrence": 1, "final_mark": 75, "status": "finished", "validated?": true, "current_team_id": 3716913, "project": { "id": 1259, "name": "C Piscine C 02", "slug": "c-piscine-c-02", "parent_id": null }, "cursus_ids": [ 9 ], "marked_at": "2021-08-16T12:28:42.787Z", "marked": true, "retriable_at": "2021-08-16T13:08:42.863Z", "created_at": "2021-08-10T08:40:53.052Z", "updated_at": "2021-08-16T12:28:42.879Z" }, { "id": 2284750, "occurrence": 0, "final_mark": 100, "status": "finished", "validated?": true, "current_team_id": 3710294, "project": { "id": 1258, "name": "C Piscine C 01", "slug": "c-piscine-c-01", "parent_id": null }, "cursus_ids": [ 9 ], "marked_at": "2021-08-10T12:02:51.765Z", "marked": true, "retriable_at": "2021-08-10T12:22:51.852Z", "created_at": "2021-08-09T11:04:17.777Z", "updated_at": "2021-08-10T12:02:51.869Z" }, { "id": 2279574, "occurrence": 0, "final_mark": 0, "status": "finished", "validated?": false, "current_team_id": 3702479, "project": { "id": 1301, "name": "C Piscine Exam 00", "slug": "c-piscine-exam-00", "parent_id": null }, "cursus_ids": [ 9 ], "marked_at": "2021-08-27T21:46:11.914Z", "marked": true, "retriable_at": null, "created_at": "2021-08-05T08:31:32.253Z", "updated_at": "2021-08-27T21:46:11.958Z" }, { "id": 2279529, "occurrence": 1, "final_mark": 100, "status": "finished", "validated?": true, "current_team_id": 3709317, "project": { "id": 1257, "name": "C Piscine C 00", "slug": "c-piscine-c-00", "parent_id": null }, "cursus_ids": [ 9 ], "marked_at": "2021-08-09T15:14:31.261Z", "marked": true, "retriable_at": "2021-08-09T15:54:31.347Z", "created_at": "2021-08-05T08:14:30.840Z", "updated_at": "2021-08-09T15:14:31.363Z" }, { "id": 2279450, "occurrence": 0, "final_mark": 116, "status": "finished", "validated?": true, "current_team_id": 3705801, "project": { "id": 1308, "name": "C Piscine Rush 00", "slug": "c-piscine-rush-00", "parent_id": null }, "cursus_ids": [ 9 ], "marked_at": "2021-08-10T15:31:20.914Z", "marked": true, "retriable_at": null, "created_at": "2021-08-05T07:43:53.159Z", "updated_at": "2021-08-10T15:31:21.446Z" }, { "id": 2274078, "occurrence": 1, "final_mark": 85, "status": "finished", "validated?": true, "current_team_id": 3702844, "project": { "id": 1256, "name": "C Piscine Shell 01", "slug": "c-piscine-shell-01", "parent_id": null }, "cursus_ids": [ 9 ], "marked_at": "2021-08-05T15:24:44.942Z", "marked": true, "retriable_at": "2021-08-05T16:04:45.005Z", "created_at": "2021-08-03T11:13:13.638Z", "updated_at": "2021-08-05T15:24:45.022Z" }, { "id": 2271390, "occurrence": 2, "final_mark": 100, "status": "finished", "validated?": true, "current_team_id": 3700071, "project": { "id": 1255, "name": "C Piscine Shell 00", "slug": "c-piscine-shell-00", "parent_id": null }, "cursus_ids": [ 9 ], "marked_at": "2021-08-04T17:07:34.784Z", "marked": true, "retriable_at": "2021-08-04T18:07:34.853Z", "created_at": "2021-08-02T09:25:05.495Z", "updated_at": "2021-08-04T17:07:34.869Z" }, { "id": 2535436, "occurrence": 0, "final_mark": 100, "status": "finished", "validated?": true, "current_team_id": 4057830, "project": { "id": 1341, "name": "CPP Module 03", "slug": "cpp-module-03", "parent_id": null }, "cursus_ids": [ 21 ], "marked_at": "2022-04-05T18:58:47.356Z", "marked": true, "retriable_at": "2022-04-08T18:58:47.386Z", "created_at": "2022-03-18T18:41:58.602Z", "updated_at": "2022-04-05T18:58:47.400Z" } ], "languages_users": [ { "id": 667199, "language_id": 11, "user_id": 95616, "position": 1, "created_at": "2022-10-17T17:19:33.463Z" }, { "id": 667200, "language_id": 1, "user_id": 95616, "position": 2, "created_at": "2022-10-17T17:19:33.488Z" }, { "id": 667201, "language_id": 2, "user_id": 95616, "position": 3, "created_at": "2022-10-17T17:19:33.512Z" }, { "id": 667202, "language_id": 19, "user_id": 95616, "position": 4, "created_at": "2022-10-17T17:19:33.531Z" } ], "achievements": [ { "id": 41, "name": "All work and no play makes Jack a dull boy", "description": "Logged for a total of 90 hours over a week.", "tier": "none", "kind": "scolarity", "visible": true, "image": "/uploads/achievement/image/41/SCO001.svg", "nbr_of_success": null, "users_url": "https://api.intra.42.fr/v2/achievements/41/users" }, { "id": 54, "name": "Attendee", "description": "Attended 1 event.", "tier": "none", "kind": "scolarity", "visible": true, "image": "/uploads/achievement/image/54/SCO003.svg", "nbr_of_success": 1, "users_url": "https://api.intra.42.fr/v2/achievements/54/users" }, { "id": 55, "name": "Attendee", "description": "Attended 3 events.", "tier": "none", "kind": "scolarity", "visible": true, "image": "/uploads/achievement/image/55/SCO003.svg", "nbr_of_success": 3, "users_url": "https://api.intra.42.fr/v2/achievements/55/users" }, { "id": 56, "name": "Attendee", "description": "Attended 10 events.", "tier": "easy", "kind": "scolarity", "visible": true, "image": "/uploads/achievement/image/56/SCO003.svg", "nbr_of_success": 10, "users_url": "https://api.intra.42.fr/v2/achievements/56/users" }, { "id": 169, "name": "Bill Gates", "description": "Donated 1 evaluation point to the pool.", "tier": "none", "kind": "scolarity", "visible": true, "image": "/uploads/achievement/image/169/BADGE_SCOLARITY_billgates.svg", "nbr_of_success": 3, "users_url": "https://api.intra.42.fr/v2/achievements/169/users" }, { "id": 170, "name": "Bill Gates", "description": "Donated 10 evaluation points to the pool.", "tier": "none", "kind": "scolarity", "visible": true, "image": "/uploads/achievement/image/170/BADGE_SCOLARITY_billgates.svg", "nbr_of_success": 16, "users_url": "https://api.intra.42.fr/v2/achievements/170/users" }, { "id": 17, "name": "Bonus Hunter", "description": "Validated 1 project with the maximum score.", "tier": "easy", "kind": "project", "visible": true, "image": "/uploads/achievement/image/17/PRO005.svg", "nbr_of_success": 1, "users_url": "https://api.intra.42.fr/v2/achievements/17/users" }, { "id": 18, "name": "Bonus Hunter", "description": "Validated 3 projects with the maximum score.", "tier": "medium", "kind": "project", "visible": true, "image": "/uploads/achievement/image/18/PRO005.svg", "nbr_of_success": 3, "users_url": "https://api.intra.42.fr/v2/achievements/18/users" }, { "id": 19, "name": "Bonus Hunter", "description": "Validated 10 projects with the maximum score.", "tier": "hard", "kind": "project", "visible": true, "image": "/uploads/achievement/image/19/PRO005.svg", "nbr_of_success": 10, "users_url": "https://api.intra.42.fr/v2/achievements/19/users" }, { "id": 4, "name": "Code Explorer", "description": "Valided your first project.", "tier": "none", "kind": "project", "visible": true, "image": "/uploads/achievement/image/4/PRO002.svg", "nbr_of_success": 1, "users_url": "https://api.intra.42.fr/v2/achievements/4/users" }, { "id": 5, "name": "Code Explorer", "description": "Validated 3 projects", "tier": "none", "kind": "project", "visible": true, "image": "/uploads/achievement/image/5/PRO002.svg", "nbr_of_success": 3, "users_url": "https://api.intra.42.fr/v2/achievements/5/users" }, { "id": 6, "name": "Code Explorer", "description": "Validated 10 projects.", "tier": "none", "kind": "project", "visible": true, "image": "/uploads/achievement/image/6/PRO002.svg", "nbr_of_success": 10, "users_url": "https://api.intra.42.fr/v2/achievements/6/users" }, { "id": 7, "name": "Code Explorer", "description": "Validated 21 projects.", "tier": "none", "kind": "project", "visible": true, "image": "/uploads/achievement/image/7/PRO002.svg", "nbr_of_success": 21, "users_url": "https://api.intra.42.fr/v2/achievements/7/users" }, { "id": 82, "name": "I have no idea what I'm doing", "description": "Made a defense without having validated the project.", "tier": "none", "kind": "pedagogy", "visible": true, "image": "/uploads/achievement/image/82/PED011.svg", "nbr_of_success": null, "users_url": "https://api.intra.42.fr/v2/achievements/82/users" }, { "id": 84, "name": "I'm reliable !", "description": "Participated in 21 defenses in a row without missing any.", "tier": "easy", "kind": "pedagogy", "visible": true, "image": "/uploads/achievement/image/84/PED009.svg", "nbr_of_success": 21, "users_url": "https://api.intra.42.fr/v2/achievements/84/users" }, { "id": 36, "name": "It's a rich man's world", "description": "Collected 100 wallet points.", "tier": "none", "kind": "social", "visible": true, "image": "/uploads/achievement/image/36/SOC004.svg", "nbr_of_success": 100, "users_url": "https://api.intra.42.fr/v2/achievements/36/users" }, { "id": 37, "name": "It's a rich man's world", "description": "Collected 200 wallet points.", "tier": "none", "kind": "social", "visible": true, "image": "/uploads/achievement/image/37/SOC004.svg", "nbr_of_success": 200, "users_url": "https://api.intra.42.fr/v2/achievements/37/users" }, { "id": 25, "name": "Rigorous Basterd", "description": "Validated 3 projects in a row (Piscine days included).", "tier": "none", "kind": "project", "visible": true, "image": "/uploads/achievement/image/25/PRO010.svg", "nbr_of_success": 3, "users_url": "https://api.intra.42.fr/v2/achievements/25/users" }, { "id": 26, "name": "Rigorous Basterd", "description": "Validated 10 projects in a row (Piscine days included).", "tier": "easy", "kind": "project", "visible": true, "image": "/uploads/achievement/image/26/PRO010.svg", "nbr_of_success": 10, "users_url": "https://api.intra.42.fr/v2/achievements/26/users" }, { "id": 83, "name": "Serial examiner", "description": "Performed 10 defenses in one day as a corrector.", "tier": "easy", "kind": "pedagogy", "visible": true, "image": "/uploads/achievement/image/83/PED010.svg", "nbr_of_success": 10, "users_url": "https://api.intra.42.fr/v2/achievements/83/users" }, { "id": 39, "name": "Sleep is for the weak", "description": "Conquered the achievements \"404 - Sleep not found\" and \"All work and no play makes Jack a dull boy\"", "tier": "none", "kind": "scolarity", "visible": true, "image": "/uploads/achievement/image/39/SCO001.svg", "nbr_of_success": null, "users_url": "https://api.intra.42.fr/v2/achievements/39/users" }, { "id": 1, "name": "Welcome, Cadet !", "description": "You have passed the C Piscine! Welcome to 42!", "tier": "none", "kind": "project", "visible": true, "image": "/uploads/achievement/image/1/PRO001.svg", "nbr_of_success": null, "users_url": "https://api.intra.42.fr/v2/achievements/1/users" }, { "id": 77, "name": "Writer's soul", "description": "Wrote 42 comments with more than 180 characters in corrections.", "tier": "none", "kind": "pedagogy", "visible": true, "image": "/uploads/achievement/image/77/PED013.svg", "nbr_of_success": null, "users_url": "https://api.intra.42.fr/v2/achievements/77/users" } ], "titles": [ { "id": 1134, "name": "Educationalist, %login 🎖" } ], "titles_users": [ { "id": 15469, "user_id": 95616, "title_id": 1134, "selected": true, "created_at": "2022-09-30T14:28:31.532Z", "updated_at": "2023-02-10T17:50:42.798Z" } ], "partnerships": [], "patroned": [], "patroning": [], "expertises_users": [], "roles": [], "campus": [ { "id": 22, "name": "Madrid", "time_zone": "Europe/Madrid", "language": { "id": 11, "name": "Spanish", "identifier": "es", "created_at": "2019-08-09T15:14:32.544Z", "updated_at": "2023-03-30T14:08:24.462Z" }, "users_count": 4647, "vogsphere_id": 15, "country": "Spain", "address": "Distrito Telefónica - Edificio Norte 3, Ronda de la Comunicación, s/n", "zip": "28050", "city": "Madrid", "website": "http://www.42madrid.com/", "facebook": "https://facebook.com/fundaciontef", "twitter": "https://twitter.com/42MadridFTef", "active": true, "public": true, "email_extension": "42madrid.com", "default_hidden_phone": true } ], "campus_users": [ { "id": 87166, "user_id": 95616, "campus_id": 22, "is_primary": true, "created_at": "2021-08-02T08:19:54.984Z", "updated_at": "2021-08-02T08:19:54.984Z" } ] } ```