{"action":"created","comment":{"url":"https://api.github.com/repos/libertempo/api/pulls/comments/226836423","pull_request_review_id":166758942,"id":226836423,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNjgzNjQyMw==","diff_hunk":"@@ -0,0 +1,36 @@\n+<?php declare(strict_types = 1);","path":"Tools/Services/WorkaroundAuthentifierService.php","position":1,"original_position":1,"commit_id":"3c9764e73c7cfd6d9a23bda0e36c842e38ae95fe","original_commit_id":"3c9764e73c7cfd6d9a23bda0e36c842e38ae95fe","user":{"login":"codacy-bot","id":19940114,"node_id":"MDQ6VXNlcjE5OTQwMTE0","avatar_url":"https://avatars1.githubusercontent.com/u/19940114?v=4","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://app.codacy.com/assets/images/favicon.png) Issue found: [End of line character is invalid; expected \"'\\n'\" but found \"\\n\"](https://app.codacy.com/app/Libertempo/api/pullRequest?prid=2400887)","created_at":"2018-10-20T18:57:45Z","updated_at":"2018-10-20T18:57:45Z","html_url":"https://github.com/libertempo/api/pull/51#discussion_r226836423","pull_request_url":"https://api.github.com/repos/libertempo/api/pulls/51","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/libertempo/api/pulls/comments/226836423"},"html":{"href":"https://github.com/libertempo/api/pull/51#discussion_r226836423"},"pull_request":{"href":"https://api.github.com/repos/libertempo/api/pulls/51"}}},"pull_request":{"url":"https://api.github.com/repos/libertempo/api/pulls/51","id":224476559,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI0NDc2NTU5","html_url":"https://github.com/libertempo/api/pull/51","diff_url":"https://github.com/libertempo/api/pull/51.diff","patch_url":"https://github.com/libertempo/api/pull/51.patch","issue_url":"https://api.github.com/repos/libertempo/api/issues/51","number":51,"state":"open","locked":false,"title":"Connexion à LDAP dans l'API - Partie 2","user":{"login":"prytoegrian","id":5312739,"node_id":"MDQ6VXNlcjUzMTI3Mzk=","avatar_url":"https://avatars1.githubusercontent.com/u/5312739?v=4","gravatar_id":"","url":"https://api.github.com/users/prytoegrian","html_url":"https://github.com/prytoegrian","followers_url":"https://api.github.com/users/prytoegrian/followers","following_url":"https://api.github.com/users/prytoegrian/following{/other_user}","gists_url":"https://api.github.com/users/prytoegrian/gists{/gist_id}","starred_url":"https://api.github.com/users/prytoegrian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prytoegrian/subscriptions","organizations_url":"https://api.github.com/users/prytoegrian/orgs","repos_url":"https://api.github.com/users/prytoegrian/repos","events_url":"https://api.github.com/users/prytoegrian/events{/privacy}","received_events_url":"https://api.github.com/users/prytoegrian/received_events","type":"User","site_admin":false},"body":"Cf. https://github.com/libertempo/web/wiki/R%C3%A9union-d'%C3%A9quipe-ao%C3%BBt-2018#compatibilit%C3%A9-api--ldap\r\n\r\nNous avions pour objectif de réaliser la compatibilité entre l'API et LDAP. Après deux petits détours (cf.  libertempo/docker#30 et libertempo/web#727), j'ai pu enfin m'atteler à ça. Ça a été long, la faute à des disponibilités aléatoires et une incompétence notoire sur la distinction entre newable et injectable qui m'a fait tourner en bourrique. \r\n\r\nLe résultat est là, fonctionnel, #49 ayant bien préparé le terrain. Cette PR place donc la responsabilité de la connexion LDAP dans l'API, moyennant l'utilisation d'une Factory qui a pour responsabilité d'abstraire le choix du connecteur et que le reste de l'appli n'ai en aucune façon besoin de savoir quel est le type de connexion. À but de souplesse, j'ai mis en place une classe qui gère les connecteurs `CAS` et `SSO` de la même façon qu'avant, c'est-à-dire avec le mot de passe « none », la connexion ayant été réalisée côté web. Par la suite, nous n'aurons qu'à placer les bonnes classes de connecteur dans la Factory pour que ça fonctionne tout seul.\r\n\r\nIl va sans dire que j'ai dû ajouter une nouvelle dépendance, `AdLDAP`, elle a l'air de pouvoir nous fournir tous nos besoins, est activement maintenue et a une conception propre, la garantie d'une pérennité et d'une robustesse donc.\r\n\r\nLe test peut se faire en binomage avec le nouveau docker et la tentative de connexion de l'utilisateur `hr / hrldap` dans tous les cas de figures : \r\n* dans LDAP mais pas dans l'appli,\r\n* dans LDAP et dans l'appli,\r\n* pas dans LDAP,\r\n* pas de connexion LDAP,\r\n* mauvaise conf LDAP,\r\n* ...\r\n\r\nUne autre PR devra être faite dans `web` pour ne plus chercher à se connecter et laisser l'API faire son travail. Après ça, la version sera bonne pour livraison.","created_at":"2018-10-20T14:00:54Z","updated_at":"2018-10-20T18:57:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6876db6fa7991746f59fa0610512a6d1a700162a","assignee":{"login":"prytoegrian","id":5312739,"node_id":"MDQ6VXNlcjUzMTI3Mzk=","avatar_url":"https://avatars1.githubusercontent.com/u/5312739?v=4","gravatar_id":"","url":"https://api.github.com/users/prytoegrian","html_url":"https://github.com/prytoegrian","followers_url":"https://api.github.com/users/prytoegrian/followers","following_url":"https://api.github.com/users/prytoegrian/following{/other_user}","gists_url":"https://api.github.com/users/prytoegrian/gists{/gist_id}","starred_url":"https://api.github.com/users/prytoegrian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prytoegrian/subscriptions","organizations_url":"https://api.github.com/users/prytoegrian/orgs","repos_url":"https://api.github.com/users/prytoegrian/repos","events_url":"https://api.github.com/users/prytoegrian/events{/privacy}","received_events_url":"https://api.github.com/users/prytoegrian/received_events","type":"User","site_admin":false},"assignees":[{"login":"prytoegrian","id":5312739,"node_id":"MDQ6VXNlcjUzMTI3Mzk=","avatar_url":"https://avatars1.githubusercontent.com/u/5312739?v=4","gravatar_id":"","url":"https://api.github.com/users/prytoegrian","html_url":"https://github.com/prytoegrian","followers_url":"https://api.github.com/users/prytoegrian/followers","following_url":"https://api.github.com/users/prytoegrian/following{/other_user}","gists_url":"https://api.github.com/users/prytoegrian/gists{/gist_id}","starred_url":"https://api.github.com/users/prytoegrian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prytoegrian/subscriptions","organizations_url":"https://api.github.com/users/prytoegrian/orgs","repos_url":"https://api.github.com/users/prytoegrian/repos","events_url":"https://api.github.com/users/prytoegrian/events{/privacy}","received_events_url":"https://api.github.com/users/prytoegrian/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"wouldsmina","id":12614881,"node_id":"MDQ6VXNlcjEyNjE0ODgx","avatar_url":"https://avatars2.githubusercontent.com/u/12614881?v=4","gravatar_id":"","url":"https://api.github.com/users/wouldsmina","html_url":"https://github.com/wouldsmina","followers_url":"https://api.github.com/users/wouldsmina/followers","following_url":"https://api.github.com/users/wouldsmina/following{/other_user}","gists_url":"https://api.github.com/users/wouldsmina/gists{/gist_id}","starred_url":"https://api.github.com/users/wouldsmina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wouldsmina/subscriptions","organizations_url":"https://api.github.com/users/wouldsmina/orgs","repos_url":"https://api.github.com/users/wouldsmina/repos","events_url":"https://api.github.com/users/wouldsmina/events{/privacy}","received_events_url":"https://api.github.com/users/wouldsmina/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":613025996,"node_id":"MDU6TGFiZWw2MTMwMjU5OTY=","url":"https://api.github.com/repos/libertempo/api/labels/Fonctionnalit%C3%A9","name":"Fonctionnalité","color":"eb6420","default":false},{"id":613027170,"node_id":"MDU6TGFiZWw2MTMwMjcxNzA=","url":"https://api.github.com/repos/libertempo/api/labels/%C3%80%20relire","name":"À relire","color":"0052cc","default":false},{"id":613026651,"node_id":"MDU6TGFiZWw2MTMwMjY2NTE=","url":"https://api.github.com/repos/libertempo/api/labels/%C3%80%20tester","name":"À tester","color":"d4c5f9","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/libertempo/api/pulls/51/commits","review_comments_url":"https://api.github.com/repos/libertempo/api/pulls/51/comments","review_comment_url":"https://api.github.com/repos/libertempo/api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/libertempo/api/issues/51/comments","statuses_url":"https://api.github.com/repos/libertempo/api/statuses/3c9764e73c7cfd6d9a23bda0e36c842e38ae95fe","head":{"label":"libertempo:pry/ldapConnexion2","ref":"pry/ldapConnexion2","sha":"3c9764e73c7cfd6d9a23bda0e36c842e38ae95fe","user":{"login":"libertempo","id":25099929,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MDk5OTI5","avatar_url":"https://avatars0.githubusercontent.com/u/25099929?v=4","gravatar_id":"","url":"https://api.github.com/users/libertempo","html_url":"https://github.com/libertempo","followers_url":"https://api.github.com/users/libertempo/followers","following_url":"https://api.github.com/users/libertempo/following{/other_user}","gists_url":"https://api.github.com/users/libertempo/gists{/gist_id}","starred_url":"https://api.github.com/users/libertempo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libertempo/subscriptions","organizations_url":"https://api.github.com/users/libertempo/orgs","repos_url":"https://api.github.com/users/libertempo/repos","events_url":"https://api.github.com/users/libertempo/events{/privacy}","received_events_url":"https://api.github.com/users/libertempo/received_events","type":"Organization","site_admin":false},"repo":{"id":83347929,"node_id":"MDEwOlJlcG9zaXRvcnk4MzM0NzkyOQ==","name":"api","full_name":"libertempo/api","private":false,"owner":{"login":"libertempo","id":25099929,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MDk5OTI5","avatar_url":"https://avatars0.githubusercontent.com/u/25099929?v=4","gravatar_id":"","url":"https://api.github.com/users/libertempo","html_url":"https://github.com/libertempo","followers_url":"https://api.github.com/users/libertempo/followers","following_url":"https://api.github.com/users/libertempo/following{/other_user}","gists_url":"https://api.github.com/users/libertempo/gists{/gist_id}","starred_url":"https://api.github.com/users/libertempo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libertempo/subscriptions","organizations_url":"https://api.github.com/users/libertempo/orgs","repos_url":"https://api.github.com/users/libertempo/repos","events_url":"https://api.github.com/users/libertempo/events{/privacy}","received_events_url":"https://api.github.com/users/libertempo/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/libertempo/api","description":"API de l'application web Libertempo","fork":false,"url":"https://api.github.com/repos/libertempo/api","forks_url":"https://api.github.com/repos/libertempo/api/forks","keys_url":"https://api.github.com/repos/libertempo/api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/libertempo/api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/libertempo/api/teams","hooks_url":"https://api.github.com/repos/libertempo/api/hooks","issue_events_url":"https://api.github.com/repos/libertempo/api/issues/events{/number}","events_url":"https://api.github.com/repos/libertempo/api/events","assignees_url":"https://api.github.com/repos/libertempo/api/assignees{/user}","branches_url":"https://api.github.com/repos/libertempo/api/branches{/branch}","tags_url":"https://api.github.com/repos/libertempo/api/tags","blobs_url":"https://api.github.com/repos/libertempo/api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/libertempo/api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/libertempo/api/git/refs{/sha}","trees_url":"https://api.github.com/repos/libertempo/api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/libertempo/api/statuses/{sha}","languages_url":"https://api.github.com/repos/libertempo/api/languages","stargazers_url":"https://api.github.com/repos/libertempo/api/stargazers","contributors_url":"https://api.github.com/repos/libertempo/api/contributors","subscribers_url":"https://api.github.com/repos/libertempo/api/subscribers","subscription_url":"https://api.github.com/repos/libertempo/api/subscription","commits_url":"https://api.github.com/repos/libertempo/api/commits{/sha}","git_commits_url":"https://api.github.com/repos/libertempo/api/git/commits{/sha}","comments_url":"https://api.github.com/repos/libertempo/api/comments{/number}","issue_comment_url":"https://api.github.com/repos/libertempo/api/issues/comments{/number}","contents_url":"https://api.github.com/repos/libertempo/api/contents/{+path}","compare_url":"https://api.github.com/repos/libertempo/api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/libertempo/api/merges","archive_url":"https://api.github.com/repos/libertempo/api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/libertempo/api/downloads","issues_url":"https://api.github.com/repos/libertempo/api/issues{/number}","pulls_url":"https://api.github.com/repos/libertempo/api/pulls{/number}","milestones_url":"https://api.github.com/repos/libertempo/api/milestones{/number}","notifications_url":"https://api.github.com/repos/libertempo/api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/libertempo/api/labels{/name}","releases_url":"https://api.github.com/repos/libertempo/api/releases{/id}","deployments_url":"https://api.github.com/repos/libertempo/api/deployments","created_at":"2017-02-27T19:26:07Z","updated_at":"2018-10-20T18:56:02Z","pushed_at":"2018-10-20T18:56:00Z","git_url":"git://github.com/libertempo/api.git","ssh_url":"git@github.com:libertempo/api.git","clone_url":"https://github.com/libertempo/api.git","svn_url":"https://github.com/libertempo/api","homepage":null,"size":4029,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":1,"open_issues":5,"watchers":1,"default_branch":"master"}},"base":{"label":"libertempo:master","ref":"master","sha":"17b77a711b7df896e96ca93cae5517fab743dea8","user":{"login":"libertempo","id":25099929,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MDk5OTI5","avatar_url":"https://avatars0.githubusercontent.com/u/25099929?v=4","gravatar_id":"","url":"https://api.github.com/users/libertempo","html_url":"https://github.com/libertempo","followers_url":"https://api.github.com/users/libertempo/followers","following_url":"https://api.github.com/users/libertempo/following{/other_user}","gists_url":"https://api.github.com/users/libertempo/gists{/gist_id}","starred_url":"https://api.github.com/users/libertempo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libertempo/subscriptions","organizations_url":"https://api.github.com/users/libertempo/orgs","repos_url":"https://api.github.com/users/libertempo/repos","events_url":"https://api.github.com/users/libertempo/events{/privacy}","received_events_url":"https://api.github.com/users/libertempo/received_events","type":"Organization","site_admin":false},"repo":{"id":83347929,"node_id":"MDEwOlJlcG9zaXRvcnk4MzM0NzkyOQ==","name":"api","full_name":"libertempo/api","private":false,"owner":{"login":"libertempo","id":25099929,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MDk5OTI5","avatar_url":"https://avatars0.githubusercontent.com/u/25099929?v=4","gravatar_id":"","url":"https://api.github.com/users/libertempo","html_url":"https://github.com/libertempo","followers_url":"https://api.github.com/users/libertempo/followers","following_url":"https://api.github.com/users/libertempo/following{/other_user}","gists_url":"https://api.github.com/users/libertempo/gists{/gist_id}","starred_url":"https://api.github.com/users/libertempo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libertempo/subscriptions","organizations_url":"https://api.github.com/users/libertempo/orgs","repos_url":"https://api.github.com/users/libertempo/repos","events_url":"https://api.github.com/users/libertempo/events{/privacy}","received_events_url":"https://api.github.com/users/libertempo/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/libertempo/api","description":"API de l'application web Libertempo","fork":false,"url":"https://api.github.com/repos/libertempo/api","forks_url":"https://api.github.com/repos/libertempo/api/forks","keys_url":"https://api.github.com/repos/libertempo/api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/libertempo/api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/libertempo/api/teams","hooks_url":"https://api.github.com/repos/libertempo/api/hooks","issue_events_url":"https://api.github.com/repos/libertempo/api/issues/events{/number}","events_url":"https://api.github.com/repos/libertempo/api/events","assignees_url":"https://api.github.com/repos/libertempo/api/assignees{/user}","branches_url":"https://api.github.com/repos/libertempo/api/branches{/branch}","tags_url":"https://api.github.com/repos/libertempo/api/tags","blobs_url":"https://api.github.com/repos/libertempo/api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/libertempo/api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/libertempo/api/git/refs{/sha}","trees_url":"https://api.github.com/repos/libertempo/api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/libertempo/api/statuses/{sha}","languages_url":"https://api.github.com/repos/libertempo/api/languages","stargazers_url":"https://api.github.com/repos/libertempo/api/stargazers","contributors_url":"https://api.github.com/repos/libertempo/api/contributors","subscribers_url":"https://api.github.com/repos/libertempo/api/subscribers","subscription_url":"https://api.github.com/repos/libertempo/api/subscription","commits_url":"https://api.github.com/repos/libertempo/api/commits{/sha}","git_commits_url":"https://api.github.com/repos/libertempo/api/git/commits{/sha}","comments_url":"https://api.github.com/repos/libertempo/api/comments{/number}","issue_comment_url":"https://api.github.com/repos/libertempo/api/issues/comments{/number}","contents_url":"https://api.github.com/repos/libertempo/api/contents/{+path}","compare_url":"https://api.github.com/repos/libertempo/api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/libertempo/api/merges","archive_url":"https://api.github.com/repos/libertempo/api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/libertempo/api/downloads","issues_url":"https://api.github.com/repos/libertempo/api/issues{/number}","pulls_url":"https://api.github.com/repos/libertempo/api/pulls{/number}","milestones_url":"https://api.github.com/repos/libertempo/api/milestones{/number}","notifications_url":"https://api.github.com/repos/libertempo/api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/libertempo/api/labels{/name}","releases_url":"https://api.github.com/repos/libertempo/api/releases{/id}","deployments_url":"https://api.github.com/repos/libertempo/api/deployments","created_at":"2017-02-27T19:26:07Z","updated_at":"2018-10-20T18:56:02Z","pushed_at":"2018-10-20T18:56:00Z","git_url":"git://github.com/libertempo/api.git","ssh_url":"git@github.com:libertempo/api.git","clone_url":"https://github.com/libertempo/api.git","svn_url":"https://github.com/libertempo/api","homepage":null,"size":4029,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":1,"open_issues":5,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/libertempo/api/pulls/51"},"html":{"href":"https://github.com/libertempo/api/pull/51"},"issue":{"href":"https://api.github.com/repos/libertempo/api/issues/51"},"comments":{"href":"https://api.github.com/repos/libertempo/api/issues/51/comments"},"review_comments":{"href":"https://api.github.com/repos/libertempo/api/pulls/51/comments"},"review_comment":{"href":"https://api.github.com/repos/libertempo/api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/libertempo/api/pulls/51/commits"},"statuses":{"href":"https://api.github.com/repos/libertempo/api/statuses/3c9764e73c7cfd6d9a23bda0e36c842e38ae95fe"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"codacy-bot"}}