diff --git a/auth/oauth2/facebook_login.php b/auth/social/facebook_login.php similarity index 100% rename from auth/oauth2/facebook_login.php rename to auth/social/facebook_login.php diff --git a/auth/oauth2/facebook_token.php b/auth/social/facebook_token.php similarity index 100% rename from auth/oauth2/facebook_token.php rename to auth/social/facebook_token.php diff --git a/auth/oauth2/google_token.php b/auth/social/google_token.php similarity index 100% rename from auth/oauth2/google_token.php rename to auth/social/google_token.php diff --git a/auth/oauth2/linkedin_login.php b/auth/social/linkedin_login.php similarity index 100% rename from auth/oauth2/linkedin_login.php rename to auth/social/linkedin_login.php diff --git a/auth/oauth2/linkedin_token.php b/auth/social/linkedin_token.php similarity index 100% rename from auth/oauth2/linkedin_token.php rename to auth/social/linkedin_token.php diff --git a/config-example.php b/config-example.php index 5c2fabcb6fc794c4dcc10dc5febede097c9c5bdb..49b10f7a071183b4b1ec29c92fd40d5567af0a30 100644 --- a/config-example.php +++ b/config-example.php @@ -59,16 +59,16 @@ $AUTHENTICATION_METHODS = array( 'Google' => array( 'id' => "XXXXXX", 'secret' => "XXXXXX", - 'callback' => $BASE_PATH . "/auth/oauth2/google_token.php"), + 'callback' => $BASE_PATH . "/auth/social/google_token.php"), 'Facebook' => array( 'id' => "XXXXXX", 'secret' => "XXXXXX", 'version' => "v3.0", - 'callback' => $BASE_PATH . "/auth/oauth2/facebook_token.php"), + 'callback' => $BASE_PATH . "/auth/social/facebook_token.php"), 'LinkedIn' => array( 'id' => 'XXXXXX', 'secret' => 'XXXXXX', - 'callback' => $BASE_PATH . '/auth/oauth2/linkedin_token.php' + 'callback' => $BASE_PATH . '/auth/social/linkedin_token.php' ), 'X.509' => array(), 'DirectIdP' => array( diff --git a/include/admin.php b/include/admin.php index 6423d3494e09f0c6a6693daf4b6a01b1abfdfc9c..4479012f37a57599f24f2b8a3f76ed534f56352f 100644 --- a/include/admin.php +++ b/include/admin.php @@ -19,6 +19,8 @@ function checkUser() { } Flight::route('GET /admin', function() { + checkUser(); + global $VERSION; Flight::render('admin/index.php', array('title' => 'Admin panel', 'version' => $VERSION)); diff --git a/include/front-controller.php b/include/front-controller.php index 463ff21308ae5c9a968ecc89d2813d09a3291806..5094c7d876325ce9034593d89004e06b1eedf6d2 100644 --- a/include/front-controller.php +++ b/include/front-controller.php @@ -54,15 +54,15 @@ function sendAuthRedirect($url) { } Flight::route('/google', function() { - sendAuthRedirect('/auth/oauth2/google_token.php'); + sendAuthRedirect('/auth/social/google_token.php'); }); Flight::route('/facebook', function() { - sendAuthRedirect('/auth/oauth2/facebook_login.php'); + sendAuthRedirect('/auth/social/facebook_login.php'); }); Flight::route('/linkedIn', function() { - sendAuthRedirect('/auth/oauth2/linkedin_login.php'); + sendAuthRedirect('/auth/social/linkedin_login.php'); }); Flight::route('/eduGAIN', function() {