Edgard 5 роки тому
батько
коміт
739b73c02d
5 змінених файлів з 218 додано та 131 видалено
  1. 84 18
      hook.php
  2. 5 0
      inc/provider.class.php
  3. 44 40
      locales/en_GB.po
  4. 45 37
      locales/pt_BR.po
  5. 40 36
      locales/singlesignon.pot

+ 84 - 18
hook.php

@@ -21,25 +21,92 @@ function plugin_singlesignon_display_login() {
       }
       }
 
 
       $url = PluginSinglesignonProvider::getCallbackUrl($row['id'], $query);
       $url = PluginSinglesignonProvider::getCallbackUrl($row['id'], $query);
-
-      $html[] = '<a href="' . $url . '" class="singlesignon" style="color: #CFCFCF">' .
-      sprintf(__sso('[ Login with %s ]'), $row['name']) . '</a>';
+      $html[] = PluginSinglesignonProvider::renderButton($url, $row['name']);
    }
    }
 
 
-   echo implode("<br />\n", $html);
-   echo '<script type="text/javascript">
-      $(".singlesignon").on("click", function (e) {
-         e.preventDefault();
-
-         var url   = $(this).attr("href");
-         var left  = ($(window).width()/2)-(600/2);
-         var top   = ($(window).height()/2)-(800/2);
-         var newWindow = window.open(url, "singlesignon", "width=600,height=800,left=" + left + ",top=" + top);
-         if (window.focus) {
-            newWindow.focus();
+   if (!empty($html)) {
+      echo '<div class="singlesignon-box">';
+      echo implode(" \n", $html);
+      echo PluginSinglesignonProvider::renderButton('#', __('GLPI'), 'vsubmit old-login');
+      echo '</div>';
+      ?>
+      <style>
+         #display-login .singlesignon-box span {
+            display: inline-block;
+            margin: 5px;
+         }
+
+         #display-login .singlesignon-box .old-login {
+            display: none;
+         }
+
+         #boxlogin .singlesignon-box span {
+            display: block;
+         }
+
+         #boxlogin .singlesignon-box .vsubmit {
+            width: 100%;
+            height: 30px;
+            font-size: 1.3em !important;
+            text-align: center;
+            box-sizing: border-box;
          }
          }
-      });
-       </script>';
+      </style>
+      <script type="text/javascript">
+         $(document).ready(function() {
+
+            // On click, open a popup
+            $(document).on("click", ".singlesignon.oauth-login", function(e) {
+               e.preventDefault();
+
+               var url = $(this).attr("href");
+               var left = ($(window).width() / 2) - (600 / 2);
+               var top = ($(window).height() / 2) - (800 / 2);
+               var newWindow = window.open(url, "singlesignon", "width=600,height=800,left=" + left + ",top=" + top);
+               if (window.focus) {
+                  newWindow.focus();
+               }
+            });
+
+            var $boxLogin = $('#boxlogin');
+            var $form = $boxLogin.find('form');
+            var $boxButtons = $('.singlesignon-box');
+
+            // Move the buttons to before form
+            $boxButtons.prependTo($boxLogin);
+            $boxButtons.find('span').addClass('login_input');
+
+            // Show old form
+            $(document).on("click", ".singlesignon.old-login", function(e) {
+               e.preventDefault();
+               $boxButtons.slideToggle();
+               $form.slideToggle(function() {
+                  $('#login_name').focus();
+               });
+            });
+
+            var $line = $('<p />', {
+               class: 'login_input'
+            }).prependTo($form);
+
+            var $backLogin = $('<label />', {
+               css: {
+                  cursor: 'pointer'
+               },
+               text: "<< " + <?php echo json_encode(__('Back')) ?>,
+            }).appendTo($line);
+
+            $backLogin.on('click', function(e) {
+               e.preventDefault();
+               $boxButtons.slideToggle();
+               $form.slideToggle();
+            });
+
+            $form.hide();
+         });
+      </script>
+      <?php
+   }
 }
 }
 
 
 function plugin_singlesignon_install() {
 function plugin_singlesignon_install() {
@@ -48,8 +115,7 @@ function plugin_singlesignon_install() {
 
 
    $currentVersion = '0.0.0';
    $currentVersion = '0.0.0';
 
 
-   $default = [
-   ];
+   $default = [];
 
 
    $current = Config::getConfigurationValues('singlesignon');
    $current = Config::getConfigurationValues('singlesignon');
 
 

+ 5 - 0
inc/provider.class.php

@@ -1014,4 +1014,9 @@ class PluginSinglesignonProvider extends CommonDBTM {
       return $data;
       return $data;
    }
    }
 
 
+   public static function renderButton($url, $name, $class = 'oauth-login') {
+      return '<span><a href="' . $url . '" class="singlesignon vsubmit ' . $class . '">' .
+      sprintf(__sso('Login with %s'), $name) . '</a></span>';
+   }
+
 }
 }

+ 44 - 40
locales/en_GB.po

@@ -1,15 +1,15 @@
 # English translations for singlesignon package.
 # English translations for singlesignon package.
-# Copyright (C) 2019 THE singlesignon'S COPYRIGHT HOLDER
+# Copyright (C) 2021 THE singlesignon'S COPYRIGHT HOLDER
 # This file is distributed under the same license as the singlesignon package.
 # This file is distributed under the same license as the singlesignon package.
-# Automatically generated, 2019.
+# Automatically generated, 2021.
 #
 #
 msgid ""
 msgid ""
 msgstr ""
 msgstr ""
 "Project-Id-Version: singlesignon 1.0.0\n"
 "Project-Id-Version: singlesignon 1.0.0\n"
 "Report-Msgid-Bugs-To: https://github.com/edgardmessias/glpi-singlesignon/"
 "Report-Msgid-Bugs-To: https://github.com/edgardmessias/glpi-singlesignon/"
 "issues\n"
 "issues\n"
-"POT-Creation-Date: 2019-04-29 09:32-0300\n"
-"PO-Revision-Date: 2019-04-29 09:32-0300\n"
+"POT-Creation-Date: 2021-01-12 13:25-0300\n"
+"PO-Revision-Date: 2021-01-12 13:25-0300\n"
 "Last-Translator: Automatically generated\n"
 "Last-Translator: Automatically generated\n"
 "Language-Team: none\n"
 "Language-Team: none\n"
 "Language: en_GB\n"
 "Language: en_GB\n"
@@ -18,10 +18,10 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
 
-#: hook.php:22
+#: hook.php:27 hook.php:75
 #, php-format
 #, php-format
-msgid "[ Login with %s ]"
-msgstr "[ Login with %s ]"
+msgid "Login with %s"
+msgstr "Login with %s"
 
 
 #: setup.php:8
 #: setup.php:8
 #, php-format
 #, php-format
@@ -29,127 +29,131 @@ msgid "Please, rename the plugin folder \"%s\" to \"singlesignon\""
 msgstr "Please, rename the plugin folder \"%s\" to \"singlesignon\""
 msgstr "Please, rename the plugin folder \"%s\" to \"singlesignon\""
 
 
 #: setup.php:36 front/provider.form.php:59 front/provider.form.php:61
 #: setup.php:36 front/provider.form.php:59 front/provider.form.php:61
-#: front/provider.php:6 front/provider.php:8 inc/provider.class.php:53
+#: front/provider.php:6 front/provider.php:8 inc/provider.class.php:57
 msgid "Single Sign-on"
 msgid "Single Sign-on"
 msgstr "Single Sign-on"
 msgstr "Single Sign-on"
 
 
-#: setup.php:49
-msgid "Run first: composer install"
-msgstr "Run first: composer install"
-
 #: setup.php:53
 #: setup.php:53
 msgid "This plugin requires GLPI >= 0.85"
 msgid "This plugin requires GLPI >= 0.85"
 msgstr "This plugin requires GLPI >= 0.85"
 msgstr "This plugin requires GLPI >= 0.85"
 
 
-#: front/callback.php:11
+#: front/callback.php:15
 msgid "Provider not defined."
 msgid "Provider not defined."
 msgstr "Provider not defined."
 msgstr "Provider not defined."
 
 
-#: front/callback.php:17
+#: front/callback.php:21
 msgid "Provider not found."
 msgid "Provider not found."
 msgstr "Provider not found."
 msgstr "Provider not found."
 
 
-#: front/callback.php:21
+#: front/callback.php:25
 msgid "Provider not active."
 msgid "Provider not active."
 msgstr "Provider not active."
 msgstr "Provider not active."
 
 
-#: inc/provider.class.php:46
+#: inc/provider.class.php:50
 msgid "Single Sign-on Provider"
 msgid "Single Sign-on Provider"
 msgstr "Single Sign-on Provider"
 msgstr "Single Sign-on Provider"
 
 
-#: inc/provider.class.php:94
+#: inc/provider.class.php:98
 msgid "SSO Type"
 msgid "SSO Type"
 msgstr "SSO Type"
 msgstr "SSO Type"
 
 
-#: inc/provider.class.php:102 inc/provider.class.php:267
+#: inc/provider.class.php:106 inc/provider.class.php:298
 msgid "Client ID"
 msgid "Client ID"
 msgstr "Client ID"
 msgstr "Client ID"
 
 
-#: inc/provider.class.php:104 inc/provider.class.php:275
+#: inc/provider.class.php:108 inc/provider.class.php:306
 msgid "Client Secret"
 msgid "Client Secret"
 msgstr "Client Secret"
 msgstr "Client Secret"
 
 
-#: inc/provider.class.php:109 inc/provider.class.php:283
+#: inc/provider.class.php:113 inc/provider.class.php:314
 msgid "Scope"
 msgid "Scope"
 msgstr "Scope"
 msgstr "Scope"
 
 
-#: inc/provider.class.php:111 inc/provider.class.php:291
+#: inc/provider.class.php:115 inc/provider.class.php:322
 msgid "Extra Options"
 msgid "Extra Options"
 msgstr "Extra Options"
 msgstr "Extra Options"
 
 
-#: inc/provider.class.php:122 inc/provider.class.php:299
+#: inc/provider.class.php:126 inc/provider.class.php:330
 msgid "Authorize URL"
 msgid "Authorize URL"
 msgstr "Authorize URL"
 msgstr "Authorize URL"
 
 
-#: inc/provider.class.php:127 inc/provider.class.php:307
+#: inc/provider.class.php:131 inc/provider.class.php:338
 msgid "Access Token URL"
 msgid "Access Token URL"
 msgstr "Access Token URL"
 msgstr "Access Token URL"
 
 
-#: inc/provider.class.php:132 inc/provider.class.php:315
+#: inc/provider.class.php:136 inc/provider.class.php:346
 msgid "Resource Owner Details URL"
 msgid "Resource Owner Details URL"
 msgstr "Resource Owner Details URL"
 msgstr "Resource Owner Details URL"
 
 
-#: inc/provider.class.php:166
+#: inc/provider.class.php:144
+msgid "Callback URL"
+msgstr "Callback URL"
+
+#: inc/provider.class.php:148
+msgid "Test Single Sign-on"
+msgstr "Test Single Sign-on"
+
+#: inc/provider.class.php:197
 msgid "A Name is required"
 msgid "A Name is required"
 msgstr "A Name is required"
 msgstr "A Name is required"
 
 
-#: inc/provider.class.php:172
+#: inc/provider.class.php:203
 #, php-format
 #, php-format
 msgid "The \"%s\" is a Invalid type"
 msgid "The \"%s\" is a Invalid type"
 msgstr "The \"%s\" is a Invalid type"
 msgstr "The \"%s\" is a Invalid type"
 
 
-#: inc/provider.class.php:176
+#: inc/provider.class.php:207
 msgid "A Client ID is required"
 msgid "A Client ID is required"
 msgstr "A Client ID is required"
 msgstr "A Client ID is required"
 
 
-#: inc/provider.class.php:180
+#: inc/provider.class.php:211
 msgid "A Client Secret is required"
 msgid "A Client Secret is required"
 msgstr "A Client Secret is required"
 msgstr "A Client Secret is required"
 
 
-#: inc/provider.class.php:185
+#: inc/provider.class.php:216
 msgid "An Authorize URL is required"
 msgid "An Authorize URL is required"
 msgstr "An Authorize URL is required"
 msgstr "An Authorize URL is required"
 
 
-#: inc/provider.class.php:187
+#: inc/provider.class.php:218
 msgid "The Authorize URL is invalid"
 msgid "The Authorize URL is invalid"
 msgstr "The Authorize URL is invalid"
 msgstr "The Authorize URL is invalid"
 
 
-#: inc/provider.class.php:191
+#: inc/provider.class.php:222
 msgid "An Access Token URL is required"
 msgid "An Access Token URL is required"
 msgstr "An Access Token URL is required"
 msgstr "An Access Token URL is required"
 
 
-#: inc/provider.class.php:193
+#: inc/provider.class.php:224
 msgid "The Access Token URL is invalid"
 msgid "The Access Token URL is invalid"
 msgstr "The Access Token URL is invalid"
 msgstr "The Access Token URL is invalid"
 
 
-#: inc/provider.class.php:197
+#: inc/provider.class.php:228
 msgid "A Resource Owner Details URL is required"
 msgid "A Resource Owner Details URL is required"
 msgstr "A Resource Owner Details URL is required"
 msgstr "A Resource Owner Details URL is required"
 
 
-#: inc/provider.class.php:199
+#: inc/provider.class.php:230
 msgid "The Resource Owner Details URL is invalid"
 msgid "The Resource Owner Details URL is invalid"
 msgstr "The Resource Owner Details URL is invalid"
 msgstr "The Resource Owner Details URL is invalid"
 
 
-#: inc/provider.class.php:374
+#: inc/provider.class.php:405
 msgid "Generic"
 msgid "Generic"
 msgstr "Generic"
 msgstr "Generic"
 
 
-#: inc/provider.class.php:375
+#: inc/provider.class.php:406
 msgid "Facebook"
 msgid "Facebook"
 msgstr "Facebook"
 msgstr "Facebook"
 
 
-#: inc/provider.class.php:376
+#: inc/provider.class.php:407
 msgid "GitHub"
 msgid "GitHub"
 msgstr "GitHub"
 msgstr "GitHub"
 
 
-#: inc/provider.class.php:377
+#: inc/provider.class.php:408
 msgid "Google"
 msgid "Google"
 msgstr "Google"
 msgstr "Google"
 
 
-#: inc/provider.class.php:378
+#: inc/provider.class.php:409
 msgid "Instagram"
 msgid "Instagram"
 msgstr "Instagram"
 msgstr "Instagram"
 
 
-#: inc/provider.class.php:379
+#: inc/provider.class.php:410
 msgid "LinkdeIn"
 msgid "LinkdeIn"
 msgstr "LinkdeIn"
 msgstr "LinkdeIn"

+ 45 - 37
locales/pt_BR.po

@@ -8,7 +8,7 @@ msgstr ""
 "Project-Id-Version: singlesignon 1.0.0\n"
 "Project-Id-Version: singlesignon 1.0.0\n"
 "Report-Msgid-Bugs-To: https://github.com/edgardmessias/glpi-singlesignon/"
 "Report-Msgid-Bugs-To: https://github.com/edgardmessias/glpi-singlesignon/"
 "issues\n"
 "issues\n"
-"POT-Creation-Date: 2019-04-26 15:28-0300\n"
+"POT-Creation-Date: 2021-01-12 13:25-0300\n"
 "PO-Revision-Date: 2019-04-26 11:04-0300\n"
 "PO-Revision-Date: 2019-04-26 11:04-0300\n"
 "Last-Translator: Edgard Lorraine Messias <edgardmessias@gmail.com>\n"
 "Last-Translator: Edgard Lorraine Messias <edgardmessias@gmail.com>\n"
 "Language-Team: none\n"
 "Language-Team: none\n"
@@ -18,10 +18,10 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
 
 
-#: hook.php:22
+#: hook.php:27 hook.php:75
 #, php-format
 #, php-format
-msgid "[ Login with %s ]"
-msgstr "[ Entrar com %s ]"
+msgid "Login with %s"
+msgstr "Entrar com %s"
 
 
 #: setup.php:8
 #: setup.php:8
 #, php-format
 #, php-format
@@ -29,127 +29,135 @@ msgid "Please, rename the plugin folder \"%s\" to \"singlesignon\""
 msgstr "Por favor, renomeie a pasta do plugin \"%s\" para \"singlesignon\""
 msgstr "Por favor, renomeie a pasta do plugin \"%s\" para \"singlesignon\""
 
 
 #: setup.php:36 front/provider.form.php:59 front/provider.form.php:61
 #: setup.php:36 front/provider.form.php:59 front/provider.form.php:61
-#: front/provider.php:6 front/provider.php:8 inc/provider.class.php:53
+#: front/provider.php:6 front/provider.php:8 inc/provider.class.php:57
 msgid "Single Sign-on"
 msgid "Single Sign-on"
 msgstr "Single Sign-on"
 msgstr "Single Sign-on"
 
 
-#: setup.php:49
-msgid "Run first: composer install"
-msgstr "Execute primeiro: composer install"
-
 #: setup.php:53
 #: setup.php:53
 msgid "This plugin requires GLPI >= 0.85"
 msgid "This plugin requires GLPI >= 0.85"
 msgstr "Este plugin requer GLPI >= 0.85"
 msgstr "Este plugin requer GLPI >= 0.85"
 
 
-#: front/callback.php:11
+#: front/callback.php:15
 msgid "Provider not defined."
 msgid "Provider not defined."
 msgstr "Provedor não definido."
 msgstr "Provedor não definido."
 
 
-#: front/callback.php:17
+#: front/callback.php:21
 msgid "Provider not found."
 msgid "Provider not found."
 msgstr "Provedor não encontrado."
 msgstr "Provedor não encontrado."
 
 
-#: front/callback.php:21
+#: front/callback.php:25
 msgid "Provider not active."
 msgid "Provider not active."
 msgstr "Provedor não ativo."
 msgstr "Provedor não ativo."
 
 
-#: inc/provider.class.php:46
+#: inc/provider.class.php:50
 msgid "Single Sign-on Provider"
 msgid "Single Sign-on Provider"
 msgstr "Provedor Single Sign-on"
 msgstr "Provedor Single Sign-on"
 
 
-#: inc/provider.class.php:94
+#: inc/provider.class.php:98
 msgid "SSO Type"
 msgid "SSO Type"
 msgstr "Tipo SSO"
 msgstr "Tipo SSO"
 
 
-#: inc/provider.class.php:102 inc/provider.class.php:267
+#: inc/provider.class.php:106 inc/provider.class.php:298
 msgid "Client ID"
 msgid "Client ID"
 msgstr "ID de Cliente"
 msgstr "ID de Cliente"
 
 
-#: inc/provider.class.php:104 inc/provider.class.php:275
+#: inc/provider.class.php:108 inc/provider.class.php:306
 msgid "Client Secret"
 msgid "Client Secret"
 msgstr "Segredo do Cliente"
 msgstr "Segredo do Cliente"
 
 
-#: inc/provider.class.php:109 inc/provider.class.php:283
+#: inc/provider.class.php:113 inc/provider.class.php:314
 msgid "Scope"
 msgid "Scope"
 msgstr "Escopo"
 msgstr "Escopo"
 
 
-#: inc/provider.class.php:111 inc/provider.class.php:291
+#: inc/provider.class.php:115 inc/provider.class.php:322
 msgid "Extra Options"
 msgid "Extra Options"
 msgstr "Opções Extras"
 msgstr "Opções Extras"
 
 
-#: inc/provider.class.php:122 inc/provider.class.php:299
+#: inc/provider.class.php:126 inc/provider.class.php:330
 msgid "Authorize URL"
 msgid "Authorize URL"
 msgstr "URL de Autorização"
 msgstr "URL de Autorização"
 
 
-#: inc/provider.class.php:127 inc/provider.class.php:307
+#: inc/provider.class.php:131 inc/provider.class.php:338
 msgid "Access Token URL"
 msgid "Access Token URL"
 msgstr "URL de Token de Acesso"
 msgstr "URL de Token de Acesso"
 
 
-#: inc/provider.class.php:132 inc/provider.class.php:315
+#: inc/provider.class.php:136 inc/provider.class.php:346
 msgid "Resource Owner Details URL"
 msgid "Resource Owner Details URL"
 msgstr "URL de Detalhes do Proprietário do Recurso"
 msgstr "URL de Detalhes do Proprietário do Recurso"
 
 
-#: inc/provider.class.php:166
+#: inc/provider.class.php:144
+msgid "Callback URL"
+msgstr ""
+
+#: inc/provider.class.php:148
+#, fuzzy
+msgid "Test Single Sign-on"
+msgstr "Single Sign-on"
+
+#: inc/provider.class.php:197
 msgid "A Name is required"
 msgid "A Name is required"
 msgstr "Nome é obrigatório"
 msgstr "Nome é obrigatório"
 
 
-#: inc/provider.class.php:172
+#: inc/provider.class.php:203
 #, php-format
 #, php-format
 msgid "The \"%s\" is a Invalid type"
 msgid "The \"%s\" is a Invalid type"
 msgstr "O \"%s\" é um tipo inválido"
 msgstr "O \"%s\" é um tipo inválido"
 
 
-#: inc/provider.class.php:176
+#: inc/provider.class.php:207
 msgid "A Client ID is required"
 msgid "A Client ID is required"
 msgstr "ID de cliente é obrigatório"
 msgstr "ID de cliente é obrigatório"
 
 
-#: inc/provider.class.php:180
+#: inc/provider.class.php:211
 msgid "A Client Secret is required"
 msgid "A Client Secret is required"
 msgstr "Segredo do Cliente é obrigatório"
 msgstr "Segredo do Cliente é obrigatório"
 
 
-#: inc/provider.class.php:185
+#: inc/provider.class.php:216
 msgid "An Authorize URL is required"
 msgid "An Authorize URL is required"
 msgstr "URL de Autorização é obrigatório"
 msgstr "URL de Autorização é obrigatório"
 
 
-#: inc/provider.class.php:187
+#: inc/provider.class.php:218
 msgid "The Authorize URL is invalid"
 msgid "The Authorize URL is invalid"
 msgstr "A URL de Autorização é inválida"
 msgstr "A URL de Autorização é inválida"
 
 
-#: inc/provider.class.php:191
+#: inc/provider.class.php:222
 msgid "An Access Token URL is required"
 msgid "An Access Token URL is required"
 msgstr "URL de Token de Acesso é obrigatório"
 msgstr "URL de Token de Acesso é obrigatório"
 
 
-#: inc/provider.class.php:193
+#: inc/provider.class.php:224
 msgid "The Access Token URL is invalid"
 msgid "The Access Token URL is invalid"
 msgstr "A URL de Token de Acesso é inválida"
 msgstr "A URL de Token de Acesso é inválida"
 
 
-#: inc/provider.class.php:197
+#: inc/provider.class.php:228
 msgid "A Resource Owner Details URL is required"
 msgid "A Resource Owner Details URL is required"
 msgstr "URL de Detalhes do Proprietário do Recurso é obrigatório"
 msgstr "URL de Detalhes do Proprietário do Recurso é obrigatório"
 
 
-#: inc/provider.class.php:199
+#: inc/provider.class.php:230
 msgid "The Resource Owner Details URL is invalid"
 msgid "The Resource Owner Details URL is invalid"
 msgstr "A URL de Detalhes do Proprietário do Recurso é inválida"
 msgstr "A URL de Detalhes do Proprietário do Recurso é inválida"
 
 
-#: inc/provider.class.php:374
+#: inc/provider.class.php:405
 msgid "Generic"
 msgid "Generic"
 msgstr "Generic"
 msgstr "Generic"
 
 
-#: inc/provider.class.php:375
+#: inc/provider.class.php:406
 msgid "Facebook"
 msgid "Facebook"
 msgstr "Facebook"
 msgstr "Facebook"
 
 
-#: inc/provider.class.php:376
+#: inc/provider.class.php:407
 msgid "GitHub"
 msgid "GitHub"
 msgstr "GitHub"
 msgstr "GitHub"
 
 
-#: inc/provider.class.php:377
+#: inc/provider.class.php:408
 msgid "Google"
 msgid "Google"
 msgstr "Google"
 msgstr "Google"
 
 
-#: inc/provider.class.php:378
+#: inc/provider.class.php:409
 msgid "Instagram"
 msgid "Instagram"
 msgstr "Instagram"
 msgstr "Instagram"
 
 
-#: inc/provider.class.php:379
+#: inc/provider.class.php:410
 msgid "LinkdeIn"
 msgid "LinkdeIn"
 msgstr "LinkdeIn"
 msgstr "LinkdeIn"
+
+#~ msgid "Run first: composer install"
+#~ msgstr "Execute primeiro: composer install"

+ 40 - 36
locales/singlesignon.pot

@@ -9,7 +9,7 @@ msgstr ""
 "Project-Id-Version: singlesignon 1.0.0\n"
 "Project-Id-Version: singlesignon 1.0.0\n"
 "Report-Msgid-Bugs-To: https://github.com/edgardmessias/glpi-singlesignon/"
 "Report-Msgid-Bugs-To: https://github.com/edgardmessias/glpi-singlesignon/"
 "issues\n"
 "issues\n"
-"POT-Creation-Date: 2019-04-29 09:32-0300\n"
+"POT-Creation-Date: 2021-01-12 13:25-0300\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -18,9 +18,9 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Content-Transfer-Encoding: 8bit\n"
 
 
-#: hook.php:22
+#: hook.php:27 hook.php:75
 #, php-format
 #, php-format
-msgid "[ Login with %s ]"
+msgid "Login with %s"
 msgstr ""
 msgstr ""
 
 
 #: setup.php:8
 #: setup.php:8
@@ -29,127 +29,131 @@ msgid "Please, rename the plugin folder \"%s\" to \"singlesignon\""
 msgstr ""
 msgstr ""
 
 
 #: setup.php:36 front/provider.form.php:59 front/provider.form.php:61
 #: setup.php:36 front/provider.form.php:59 front/provider.form.php:61
-#: front/provider.php:6 front/provider.php:8 inc/provider.class.php:53
+#: front/provider.php:6 front/provider.php:8 inc/provider.class.php:57
 msgid "Single Sign-on"
 msgid "Single Sign-on"
 msgstr ""
 msgstr ""
 
 
-#: setup.php:49
-msgid "Run first: composer install"
-msgstr ""
-
 #: setup.php:53
 #: setup.php:53
 msgid "This plugin requires GLPI >= 0.85"
 msgid "This plugin requires GLPI >= 0.85"
 msgstr ""
 msgstr ""
 
 
-#: front/callback.php:11
+#: front/callback.php:15
 msgid "Provider not defined."
 msgid "Provider not defined."
 msgstr ""
 msgstr ""
 
 
-#: front/callback.php:17
+#: front/callback.php:21
 msgid "Provider not found."
 msgid "Provider not found."
 msgstr ""
 msgstr ""
 
 
-#: front/callback.php:21
+#: front/callback.php:25
 msgid "Provider not active."
 msgid "Provider not active."
 msgstr ""
 msgstr ""
 
 
-#: inc/provider.class.php:46
+#: inc/provider.class.php:50
 msgid "Single Sign-on Provider"
 msgid "Single Sign-on Provider"
 msgstr ""
 msgstr ""
 
 
-#: inc/provider.class.php:94
+#: inc/provider.class.php:98
 msgid "SSO Type"
 msgid "SSO Type"
 msgstr ""
 msgstr ""
 
 
-#: inc/provider.class.php:102 inc/provider.class.php:267
+#: inc/provider.class.php:106 inc/provider.class.php:298
 msgid "Client ID"
 msgid "Client ID"
 msgstr ""
 msgstr ""
 
 
-#: inc/provider.class.php:104 inc/provider.class.php:275
+#: inc/provider.class.php:108 inc/provider.class.php:306
 msgid "Client Secret"
 msgid "Client Secret"
 msgstr ""
 msgstr ""
 
 
-#: inc/provider.class.php:109 inc/provider.class.php:283
+#: inc/provider.class.php:113 inc/provider.class.php:314
 msgid "Scope"
 msgid "Scope"
 msgstr ""
 msgstr ""
 
 
-#: inc/provider.class.php:111 inc/provider.class.php:291
+#: inc/provider.class.php:115 inc/provider.class.php:322
 msgid "Extra Options"
 msgid "Extra Options"
 msgstr ""
 msgstr ""
 
 
-#: inc/provider.class.php:122 inc/provider.class.php:299
+#: inc/provider.class.php:126 inc/provider.class.php:330
 msgid "Authorize URL"
 msgid "Authorize URL"
 msgstr ""
 msgstr ""
 
 
-#: inc/provider.class.php:127 inc/provider.class.php:307
+#: inc/provider.class.php:131 inc/provider.class.php:338
 msgid "Access Token URL"
 msgid "Access Token URL"
 msgstr ""
 msgstr ""
 
 
-#: inc/provider.class.php:132 inc/provider.class.php:315
+#: inc/provider.class.php:136 inc/provider.class.php:346
 msgid "Resource Owner Details URL"
 msgid "Resource Owner Details URL"
 msgstr ""
 msgstr ""
 
 
-#: inc/provider.class.php:166
+#: inc/provider.class.php:144
+msgid "Callback URL"
+msgstr ""
+
+#: inc/provider.class.php:148
+msgid "Test Single Sign-on"
+msgstr ""
+
+#: inc/provider.class.php:197
 msgid "A Name is required"
 msgid "A Name is required"
 msgstr ""
 msgstr ""
 
 
-#: inc/provider.class.php:172
+#: inc/provider.class.php:203
 #, php-format
 #, php-format
 msgid "The \"%s\" is a Invalid type"
 msgid "The \"%s\" is a Invalid type"
 msgstr ""
 msgstr ""
 
 
-#: inc/provider.class.php:176
+#: inc/provider.class.php:207
 msgid "A Client ID is required"
 msgid "A Client ID is required"
 msgstr ""
 msgstr ""
 
 
-#: inc/provider.class.php:180
+#: inc/provider.class.php:211
 msgid "A Client Secret is required"
 msgid "A Client Secret is required"
 msgstr ""
 msgstr ""
 
 
-#: inc/provider.class.php:185
+#: inc/provider.class.php:216
 msgid "An Authorize URL is required"
 msgid "An Authorize URL is required"
 msgstr ""
 msgstr ""
 
 
-#: inc/provider.class.php:187
+#: inc/provider.class.php:218
 msgid "The Authorize URL is invalid"
 msgid "The Authorize URL is invalid"
 msgstr ""
 msgstr ""
 
 
-#: inc/provider.class.php:191
+#: inc/provider.class.php:222
 msgid "An Access Token URL is required"
 msgid "An Access Token URL is required"
 msgstr ""
 msgstr ""
 
 
-#: inc/provider.class.php:193
+#: inc/provider.class.php:224
 msgid "The Access Token URL is invalid"
 msgid "The Access Token URL is invalid"
 msgstr ""
 msgstr ""
 
 
-#: inc/provider.class.php:197
+#: inc/provider.class.php:228
 msgid "A Resource Owner Details URL is required"
 msgid "A Resource Owner Details URL is required"
 msgstr ""
 msgstr ""
 
 
-#: inc/provider.class.php:199
+#: inc/provider.class.php:230
 msgid "The Resource Owner Details URL is invalid"
 msgid "The Resource Owner Details URL is invalid"
 msgstr ""
 msgstr ""
 
 
-#: inc/provider.class.php:374
+#: inc/provider.class.php:405
 msgid "Generic"
 msgid "Generic"
 msgstr ""
 msgstr ""
 
 
-#: inc/provider.class.php:375
+#: inc/provider.class.php:406
 msgid "Facebook"
 msgid "Facebook"
 msgstr ""
 msgstr ""
 
 
-#: inc/provider.class.php:376
+#: inc/provider.class.php:407
 msgid "GitHub"
 msgid "GitHub"
 msgstr ""
 msgstr ""
 
 
-#: inc/provider.class.php:377
+#: inc/provider.class.php:408
 msgid "Google"
 msgid "Google"
 msgstr ""
 msgstr ""
 
 
-#: inc/provider.class.php:378
+#: inc/provider.class.php:409
 msgid "Instagram"
 msgid "Instagram"
 msgstr ""
 msgstr ""
 
 
-#: inc/provider.class.php:379
+#: inc/provider.class.php:410
 msgid "LinkdeIn"
 msgid "LinkdeIn"
 msgstr ""
 msgstr ""