diff --git a/README.md b/README.md index a4e3e8adb4180c98b927af06435de1981cdb565e..af440deb0ca3d571bc9185df39c4fe8d299f9b60 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Remote Authentication Portal -An authentication portal supporting eduGAIN (using Shibboleth SP), social logins (Google, LinkedIn and Facebook) and X.509 certificates. Caller services always see an OIDC flow. Account linking and merging is supported. Currently used for authenticating on [IA2 services](https://sso.ia2.inaf.it). +An authentication portal supporting eduGAIN (using Shibboleth SP), social logins (Google, LinkedIn) and X.509 certificates. Caller services always see an OIDC flow. Account linking and merging is supported. Currently used for authenticating on [IA2 services](https://sso.ia2.inaf.it). ## Docker demo @@ -61,7 +61,6 @@ Before using social API it is necessary to register an application on each socia * https://console.developers.google.com * https://www.linkedin.com/developer/apps -* https://developers.facebook.com/apps ### Configuration file diff --git a/classes/model/AuthPageModel.php b/classes/model/AuthPageModel.php index 8aaabc4634d2980e2ea60ff596264e4a6212a13c..ee5bca4c0a8abc772ce959880ff7e63789df5f97 100644 --- a/classes/model/AuthPageModel.php +++ b/classes/model/AuthPageModel.php @@ -18,7 +18,6 @@ class AuthPageModel { public $orcid; public $x509; public $google; - public $facebook; public $linkedIn; public $localIdP; public $test; @@ -57,9 +56,6 @@ class AuthPageModel { $this->google = isset($config->authenticationMethods->Google) && in_array(AuthenticationMethods::GOOGLE, $client->authMethods); - $this->facebook = isset($config->authenticationMethods->Facebook) && - in_array(AuthenticationMethods::FACEBOOK, $client->authMethods); - $this->linkedIn = isset($config->authenticationMethods->LinkedIn) && in_array(AuthenticationMethods::LINKED_IN, $client->authMethods); diff --git a/classes/model/AuthenticationMethods.php b/classes/model/AuthenticationMethods.php index f952e67e73daef415c40f609251d54566efe89f0..97560c03f2901dcb0045e9d32e2fd1b2b10d31d5 100644 --- a/classes/model/AuthenticationMethods.php +++ b/classes/model/AuthenticationMethods.php @@ -15,7 +15,6 @@ abstract class AuthenticationMethods { const X509 = "X.509"; const GOOGLE = "Google"; const LINKED_IN = "LinkedIn"; - const FACEBOOK = "Facebook"; const LOCAL_IDP = "LocalIdP"; public static function getAllMethods() { @@ -25,7 +24,6 @@ abstract class AuthenticationMethods { AuthenticationMethods::X509, AuthenticationMethods::GOOGLE, AuthenticationMethods::LINKED_IN, - AuthenticationMethods::FACEBOOK, AuthenticationMethods::LOCAL_IDP ]; } diff --git a/classes/model/Identity.php b/classes/model/Identity.php index c480e4143af78c9bf7f44b962c17bb5c5f327100..4c21dbffe63787ce02700bde8d642fbbd35ba25d 100644 --- a/classes/model/Identity.php +++ b/classes/model/Identity.php @@ -16,11 +16,10 @@ class Identity { const EDU_GAIN = "eduGAIN"; const X509 = "X.509"; const GOOGLE = "Google"; - const FACEBOOK = "Facebook"; const LINKEDIN = "LinkedIn"; const ORCID = "OrcID"; - private static $ALLOWED_TYPES = [Identity::EDU_GAIN, Identity::X509, Identity::GOOGLE, Identity::FACEBOOK, Identity::LINKEDIN, Identity::ORCID]; + private static $ALLOWED_TYPES = [Identity::EDU_GAIN, Identity::X509, Identity::GOOGLE, Identity::LINKEDIN, Identity::ORCID]; /** * Identity id in the database. Mandatory field. @@ -34,7 +33,7 @@ class Identity { /** * Data related to specific account type (shibboleth persistent id, - * facebook id, certificate serial number, etc, ...). Mandatory field. + * certificate serial number, etc, ...). Mandatory field. */ public $typedId; diff --git a/composer.json b/composer.json index 6bebc79b0caf502b427d13cbd48356e8e4d5a8a2..827a1b84f5d2a34de26f46e69bb132c65a0e339b 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,6 @@ "require": { "mikecao/flight": "1.3.7", "google/apiclient": "2.1.3", - "facebook/graph-sdk": "^5.5", "monolog/monolog": "^1.22" }, "require-dev": { diff --git a/config-example.yaml b/config-example.yaml index a4d61aeb33655d7a93bbfe29d2a9d239a2030f8e..13756db0b9d11e6ae39b5e2ac75977b9ee3ae0d1 100644 --- a/config-example.yaml +++ b/config-example.yaml @@ -20,11 +20,6 @@ authenticationMethods: id: "XXXXXX" secret: "XXXXXX" callback: "/auth/social/google" - Facebook: - id: "XXXXXX" - secret: "XXXXXX" - version: "v8.0" - callback: "/auth/social/facebook/token" LinkedIn: id: "XXXXXX" secret: "XXXXXX" @@ -60,7 +55,7 @@ clients: home: http://localhost:8082/gms icon: showInHome: true - methods: [eduGAIN, Google, Facebook, LinkedIn, X.509, LocalIdP] + methods: [eduGAIN, Google, LinkedIn, X.509, LocalIdP] - label: "Asiago Astrophysical Observatory (localhost)" id: aao-dev secret: 2a97516c354b68848cdbd8f54a226a0a55b21ed138e207ad6c5cbb9c00aa5aea @@ -69,9 +64,9 @@ clients: home: http://localhost:8081/aao icon: asiago.gif showInHome: true - methods: [eduGAIN, Google, Facebook, LinkedIn, X.509, LocalIdP] + methods: [eduGAIN, Google, LinkedIn, X.509, LocalIdP] cliClients: - id: gms_cli secret: 2a97516c354b68848cdbd8f54a226a0a55b21ed138e207ad6c5cbb9c00aa5aea scope: "read:gms write:gms read:rap" - audience: [gms] \ No newline at end of file + audience: [gms] diff --git a/docker/demo-config.yaml b/docker/demo-config.yaml index 2ad850e0fb55af6257ce3329754ed18e14e650c9..517f9760d9b047c36c1277af53c7ab4f36c59efb 100644 --- a/docker/demo-config.yaml +++ b/docker/demo-config.yaml @@ -40,7 +40,7 @@ clients: home: http://localhost:8081/gms icon: showInHome: true - methods: [eduGAIN, Google, Facebook, LinkedIn, X.509, LocalIdP] + methods: [eduGAIN, Google, LinkedIn, X.509, LocalIdP] cliClients: - id: rap_cli diff --git a/include/front-controller.php b/include/front-controller.php index 7cee15777682f9b6f37cb38fa0b8d6c27ec5ff5d..b3eb3cd6338368faf15aa122aa9937d9266bb5a5 100644 --- a/include/front-controller.php +++ b/include/front-controller.php @@ -173,20 +173,6 @@ Flight::route('/auth/social/google', function() { } }); -Flight::route('/auth/social/facebook', function() { - session_start(); - global $locator; - $facebookLogin = new \RAP\FacebookLogin($locator); - Flight::redirect($facebookLogin->login()); -}); - -Flight::route('/auth/social/facebook/token', function() { - session_start(); - global $locator; - $facebookLogin = new \RAP\FacebookLogin($locator); - Flight::redirect($facebookLogin->retrieveToken()); -}); - Flight::route('/auth/social/linkedIn', function() { session_start(); global $locator; diff --git a/js/admin.js b/js/admin.js index d07d56d68abcf2289a87b6b2596b925b886032fa..f819c3a86f4c71ac06061a1c60552c6b672840d9 100644 --- a/js/admin.js +++ b/js/admin.js @@ -1,6 +1,6 @@ (function () { - var AUTH_METHODS = ['eduGAIN', 'Google', 'Facebook', 'LinkedIn', 'X.509', 'LocalIdP']; + var AUTH_METHODS = ['eduGAIN', 'Google', 'LinkedIn', 'X.509', 'LocalIdP']; var vm = new Vue({ el: '#admin-vue', @@ -159,4 +159,4 @@ hideWaiting(); }); -})(); \ No newline at end of file +})(); diff --git a/views/admin/index.php b/views/admin/index.php index e9d7891d34ca9bef678d6ddda5bd7249eca0a209..960bae20e3de9a978d26ebd6abe46dee619b7e1a 100644 --- a/views/admin/index.php +++ b/views/admin/index.php @@ -102,9 +102,6 @@ include 'include/header.php'; <label> <input type="checkbox" v-model="client.authMethods['Google']"> Google </label> - <label> - <input type="checkbox" v-model="client.authMethods['Facebook']"> Facebook - </label> <label> <input type="checkbox" v-model="client.authMethods['LinkedIn']"> LinkedIn </label> diff --git a/views/main-page.php b/views/main-page.php index 5d2207c7f3c61544eb04270070b582706d649c9b..57948894be265abecb90bc944393796ec4d141dc 100644 --- a/views/main-page.php +++ b/views/main-page.php @@ -36,7 +36,7 @@ include 'include/header.php'; Use the eduGAIN or OrcID Logo to Login or Register to RAP facility with your Institutional account. </div> <?php } ?> - <?php if ($model->google || $model->facebook || $model->linkedIn) { ?> + <?php if ($model->google || $model->linkedIn) { ?> <div class="home-box"> <div class="img-wrapper"> <?php if ($model->google) { ?> @@ -44,11 +44,6 @@ include 'include/header.php'; <img src="img/google-60.png" alt="Google Logo" /> </a> <?php } ?> - <?php if ($model->facebook) { ?> - <a href="auth/social/facebook"> - <img src="img/facebook-60.png" alt="Facebook Logo" /> - </a> - <?php } ?> <?php if ($model->linkedIn) { ?> <a href="auth/social/linkedin"> <img src="img/linkedin-60.png" alt="LinkedIn Logo" />