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

Removed support to Facebook.

parent c10ea144
Branches
No related tags found
No related merge requests found
# 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
......
......@@ -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);
......
......@@ -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
];
}
......
......@@ -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;
......
......@@ -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": {
......
......@@ -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,7 +64,7 @@ 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
......
......@@ -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
......
......@@ -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;
......
(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',
......
......@@ -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>
......
......@@ -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" />
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment