Development #21962
ajouter un hook a2_hook_modify_serializer pour rapporter les informations de liaison FC si présence paramètre ?full
0%
Description
Test via request = serializer.context.get('request')
.
Ajouter un champ franceconnect
avec la valeur:
{
"linked": true,
"link": "https://idp/link-view/",
"unlink": "https://idp/unlink-view/"
}
Fichiers
Demandes liées
Révisions associées
api: add franceconnect information to user's API when ?full is used (fixes #21962)
The following field is added to user's attributes if FC plugin is
enabled and the "full" parameter is given to the user's API:
"franceconnect": {
"linked": true,
"link_url": "https://idp/accounts/fc/callback/",
"unlink_url": "https://idp/accounts/fc/unlink/"
}
Historique
Mis à jour par Benjamin Dauvergne il y a environ 6 ans
- Lié à Development #21768: Étendre l'API "user" avec les informations de liaison FranceConnect ajouté
Mis à jour par Benjamin Dauvergne il y a environ 6 ans
- Fichier 0001-api-add-franceconnect-information-to-user-s-API-when.patch 0001-api-add-franceconnect-information-to-user-s-API-when.patch ajouté
Avec des tests.
Mis à jour par Frédéric Péters il y a environ 6 ans
Pour être sûr, les URL fournies, c'est juste au niveau du test qu'il y a exploitation en mode API, simplement rediriger dessus fonctionne aussi ? (le @detail_route() ajoute la méthode DELETE à la vue UnlinkView, si je suis bien).
Si c'est bien ça, ack.
Mis à jour par Benjamin Dauvergne il y a environ 6 ans
link fonctionne sur un simple GET (puisque de toute façon si c'est la première fois il faudra une confirmation), et unlink sur un GET propose un formulaire de confirmation pour éviter les CSRF.
Mis à jour par Frédéric Péters il y a environ 6 ans
- Statut changé de Nouveau à En cours
- Patch proposed changé de Non à Oui
Mis à jour par Benjamin Dauvergne il y a environ 6 ans
- Statut changé de En cours à Résolu (à déployer)
- % réalisé changé de 0 à 100
Appliqué par commit authentic2-auth-fc|afa48159bb2ec950b00ad6ac650d240864bb1133.
Mis à jour par Benjamin Dauvergne il y a environ 6 ans
- Version cible mis à 0.11
- % réalisé changé de 100 à 0
Mis à jour par Benjamin Dauvergne il y a environ 6 ans
- Statut changé de Résolu (à déployer) à Fermé
api: add franceconnect information to user's API when ?full is used (fixes #21962)
The following field is added to user's attributes if FC plugin is
enabled and the "full" parameter is given to the user's API: