Skip to content
Snippets Groups Projects
Commit e8d07772 authored by Cristiano Urban's avatar Cristiano Urban
Browse files

Removed support to Facebook.

parent c10ea144
No related branches found
No related tags found
No related merge requests found
# Remote Authentication Portal # 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 ## Docker demo
...@@ -61,7 +61,6 @@ Before using social API it is necessary to register an application on each socia ...@@ -61,7 +61,6 @@ Before using social API it is necessary to register an application on each socia
* https://console.developers.google.com * https://console.developers.google.com
* https://www.linkedin.com/developer/apps * https://www.linkedin.com/developer/apps
* https://developers.facebook.com/apps
### Configuration file ### Configuration file
......
...@@ -18,7 +18,6 @@ class AuthPageModel { ...@@ -18,7 +18,6 @@ class AuthPageModel {
public $orcid; public $orcid;
public $x509; public $x509;
public $google; public $google;
public $facebook;
public $linkedIn; public $linkedIn;
public $localIdP; public $localIdP;
public $test; public $test;
...@@ -57,9 +56,6 @@ class AuthPageModel { ...@@ -57,9 +56,6 @@ class AuthPageModel {
$this->google = isset($config->authenticationMethods->Google) && $this->google = isset($config->authenticationMethods->Google) &&
in_array(AuthenticationMethods::GOOGLE, $client->authMethods); in_array(AuthenticationMethods::GOOGLE, $client->authMethods);
$this->facebook = isset($config->authenticationMethods->Facebook) &&
in_array(AuthenticationMethods::FACEBOOK, $client->authMethods);
$this->linkedIn = isset($config->authenticationMethods->LinkedIn) && $this->linkedIn = isset($config->authenticationMethods->LinkedIn) &&
in_array(AuthenticationMethods::LINKED_IN, $client->authMethods); in_array(AuthenticationMethods::LINKED_IN, $client->authMethods);
......
...@@ -15,7 +15,6 @@ abstract class AuthenticationMethods { ...@@ -15,7 +15,6 @@ abstract class AuthenticationMethods {
const X509 = "X.509"; const X509 = "X.509";
const GOOGLE = "Google"; const GOOGLE = "Google";
const LINKED_IN = "LinkedIn"; const LINKED_IN = "LinkedIn";
const FACEBOOK = "Facebook";
const LOCAL_IDP = "LocalIdP"; const LOCAL_IDP = "LocalIdP";
public static function getAllMethods() { public static function getAllMethods() {
...@@ -25,7 +24,6 @@ abstract class AuthenticationMethods { ...@@ -25,7 +24,6 @@ abstract class AuthenticationMethods {
AuthenticationMethods::X509, AuthenticationMethods::X509,
AuthenticationMethods::GOOGLE, AuthenticationMethods::GOOGLE,
AuthenticationMethods::LINKED_IN, AuthenticationMethods::LINKED_IN,
AuthenticationMethods::FACEBOOK,
AuthenticationMethods::LOCAL_IDP AuthenticationMethods::LOCAL_IDP
]; ];
} }
......
...@@ -16,11 +16,10 @@ class Identity { ...@@ -16,11 +16,10 @@ class Identity {
const EDU_GAIN = "eduGAIN"; const EDU_GAIN = "eduGAIN";
const X509 = "X.509"; const X509 = "X.509";
const GOOGLE = "Google"; const GOOGLE = "Google";
const FACEBOOK = "Facebook";
const LINKEDIN = "LinkedIn"; const LINKEDIN = "LinkedIn";
const ORCID = "OrcID"; 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. * Identity id in the database. Mandatory field.
...@@ -34,7 +33,7 @@ class Identity { ...@@ -34,7 +33,7 @@ class Identity {
/** /**
* Data related to specific account type (shibboleth persistent id, * 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; public $typedId;
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
"require": { "require": {
"mikecao/flight": "1.3.7", "mikecao/flight": "1.3.7",
"google/apiclient": "2.1.3", "google/apiclient": "2.1.3",
"facebook/graph-sdk": "^5.5",
"monolog/monolog": "^1.22" "monolog/monolog": "^1.22"
}, },
"require-dev": { "require-dev": {
......
...@@ -20,11 +20,6 @@ authenticationMethods: ...@@ -20,11 +20,6 @@ authenticationMethods:
id: "XXXXXX" id: "XXXXXX"
secret: "XXXXXX" secret: "XXXXXX"
callback: "/auth/social/google" callback: "/auth/social/google"
Facebook:
id: "XXXXXX"
secret: "XXXXXX"
version: "v8.0"
callback: "/auth/social/facebook/token"
LinkedIn: LinkedIn:
id: "XXXXXX" id: "XXXXXX"
secret: "XXXXXX" secret: "XXXXXX"
...@@ -60,7 +55,7 @@ clients: ...@@ -60,7 +55,7 @@ clients:
home: http://localhost:8082/gms home: http://localhost:8082/gms
icon: icon:
showInHome: true showInHome: true
methods: [eduGAIN, Google, Facebook, LinkedIn, X.509, LocalIdP] methods: [eduGAIN, Google, LinkedIn, X.509, LocalIdP]
- label: "Asiago Astrophysical Observatory (localhost)" - label: "Asiago Astrophysical Observatory (localhost)"
id: aao-dev id: aao-dev
secret: 2a97516c354b68848cdbd8f54a226a0a55b21ed138e207ad6c5cbb9c00aa5aea secret: 2a97516c354b68848cdbd8f54a226a0a55b21ed138e207ad6c5cbb9c00aa5aea
...@@ -69,7 +64,7 @@ clients: ...@@ -69,7 +64,7 @@ clients:
home: http://localhost:8081/aao home: http://localhost:8081/aao
icon: asiago.gif icon: asiago.gif
showInHome: true showInHome: true
methods: [eduGAIN, Google, Facebook, LinkedIn, X.509, LocalIdP] methods: [eduGAIN, Google, LinkedIn, X.509, LocalIdP]
cliClients: cliClients:
- id: gms_cli - id: gms_cli
secret: 2a97516c354b68848cdbd8f54a226a0a55b21ed138e207ad6c5cbb9c00aa5aea secret: 2a97516c354b68848cdbd8f54a226a0a55b21ed138e207ad6c5cbb9c00aa5aea
......
...@@ -40,7 +40,7 @@ clients: ...@@ -40,7 +40,7 @@ clients:
home: http://localhost:8081/gms home: http://localhost:8081/gms
icon: icon:
showInHome: true showInHome: true
methods: [eduGAIN, Google, Facebook, LinkedIn, X.509, LocalIdP] methods: [eduGAIN, Google, LinkedIn, X.509, LocalIdP]
cliClients: cliClients:
- id: rap_cli - id: rap_cli
......
...@@ -173,20 +173,6 @@ Flight::route('/auth/social/google', function() { ...@@ -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() { Flight::route('/auth/social/linkedIn', function() {
session_start(); session_start();
global $locator; global $locator;
......
(function () { (function () {
var AUTH_METHODS = ['eduGAIN', 'Google', 'Facebook', 'LinkedIn', 'X.509', 'LocalIdP']; var AUTH_METHODS = ['eduGAIN', 'Google', 'LinkedIn', 'X.509', 'LocalIdP'];
var vm = new Vue({ var vm = new Vue({
el: '#admin-vue', el: '#admin-vue',
......
...@@ -102,9 +102,6 @@ include 'include/header.php'; ...@@ -102,9 +102,6 @@ include 'include/header.php';
<label> <label>
<input type="checkbox" v-model="client.authMethods['Google']"> Google <input type="checkbox" v-model="client.authMethods['Google']"> Google
</label> </label>
<label>
<input type="checkbox" v-model="client.authMethods['Facebook']"> Facebook
</label>
<label> <label>
<input type="checkbox" v-model="client.authMethods['LinkedIn']"> LinkedIn <input type="checkbox" v-model="client.authMethods['LinkedIn']"> LinkedIn
</label> </label>
......
...@@ -36,7 +36,7 @@ include 'include/header.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. Use the eduGAIN or OrcID Logo to Login or Register to RAP facility with your Institutional account.
</div> </div>
<?php } ?> <?php } ?>
<?php if ($model->google || $model->facebook || $model->linkedIn) { ?> <?php if ($model->google || $model->linkedIn) { ?>
<div class="home-box"> <div class="home-box">
<div class="img-wrapper"> <div class="img-wrapper">
<?php if ($model->google) { ?> <?php if ($model->google) { ?>
...@@ -44,11 +44,6 @@ include 'include/header.php'; ...@@ -44,11 +44,6 @@ include 'include/header.php';
<img src="img/google-60.png" alt="Google Logo" /> <img src="img/google-60.png" alt="Google Logo" />
</a> </a>
<?php } ?> <?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) { ?> <?php if ($model->linkedIn) { ?>
<a href="auth/social/linkedin"> <a href="auth/social/linkedin">
<img src="img/linkedin-60.png" alt="LinkedIn Logo" /> <img src="img/linkedin-60.png" alt="LinkedIn Logo" />
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment