aboutsummaryrefslogtreecommitdiff
path: root/p/scripts/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'p/scripts/main.js')
-rw-r--r--p/scripts/main.js65
1 files changed, 0 insertions, 65 deletions
diff --git a/p/scripts/main.js b/p/scripts/main.js
index b01a3a34d..77e1e3f77 100644
--- a/p/scripts/main.js
+++ b/p/scripts/main.js
@@ -1034,67 +1034,7 @@ function init_crypto_form() {
}
//</crypto form (Web login)>
-//<persona>
-function init_persona() {
- if (!(navigator.id)) {
- if (window.console) {
- console.log('FreshRSS waiting for Persona…');
- }
- window.setTimeout(init_persona, 100);
- return;
- }
- $('a.signin').click(function() {
- navigator.id.request();
- return false;
- });
-
- $('a.signout').click(function() {
- navigator.id.logout();
- return false;
- });
- navigator.id.watch({
- loggedInUser: context['current_user_mail'],
-
- onlogin: function(assertion) {
- // A user has logged in! Here you need to:
- // 1. Send the assertion to your backend for verification and to create a session.
- // 2. Update your UI.
- $.ajax ({
- type: 'POST',
- url: url['login'],
- data: {assertion: assertion},
- success: function(res, status, xhr) {
- /*if (res.status === 'failure') {
- alert (res_obj.reason);
- } else*/ if (res.status === 'okay') {
- location.href = url['index'];
- }
- },
- error: function(res, status, xhr) {
- alert("Login failure: " + res);
- }
- });
- },
- onlogout: function() {
- // A user has logged out! Here you need to:
- // Tear down the user's session by redirecting the user or making a call to your backend.
- // Also, make sure loggedInUser will get set to null on the next page load.
- // (That's a literal JavaScript null. Not false, 0, or undefined. null.)
- $.ajax ({
- type: 'POST',
- url: url['logout'],
- success: function(res, status, xhr) {
- location.href = url['index'];
- },
- error: function(res, status, xhr) {
- //alert("logout failure" + res);
- }
- });
- }
- });
-}
-//</persona>
function init_confirm_action() {
$('body').on('click', '.confirm', function () {
@@ -1274,11 +1214,6 @@ function init_all() {
return;
}
init_notifications();
- switch (context['auth_type']) {
- case 'persona':
- init_persona();
- break;
- }
init_confirm_action();
$stream = $('#stream');
if ($stream.length > 0) {