diff --git a/datamodels/2.x/installation.xml b/datamodels/2.x/installation.xml
index 167125d93..89f2a212e 100755
--- a/datamodels/2.x/installation.xml
+++ b/datamodels/2.x/installation.xml
@@ -20,7 +20,7 @@
combodo-db-tools
itop-core-update
itop-hub-connector
- itop-remote-authent-oauth
+ itop-oauth-client
true
diff --git a/datamodels/2.x/itop-oauth-client/README.md b/datamodels/2.x/itop-oauth-client/README.md
new file mode 100644
index 000000000..a520ac75c
--- /dev/null
+++ b/datamodels/2.x/itop-oauth-client/README.md
@@ -0,0 +1,2 @@
+# Extension OAuth 2.0 client
+
diff --git a/datamodels/2.x/itop-remote-authent-oauth/ajax.php b/datamodels/2.x/itop-oauth-client/ajax.php
similarity index 52%
rename from datamodels/2.x/itop-remote-authent-oauth/ajax.php
rename to datamodels/2.x/itop-oauth-client/ajax.php
index da6859faf..1b81b0829 100644
--- a/datamodels/2.x/itop-remote-authent-oauth/ajax.php
+++ b/datamodels/2.x/itop-oauth-client/ajax.php
@@ -4,19 +4,19 @@
* @license http://opensource.org/licenses/AGPL-3.0
*/
-namespace Combodo\iTop\RemoteAuthentOAuth;
+namespace Combodo\iTop\OAuthClient;
-use Combodo\iTop\RemoteAuthentOAuth\Controller\AjaxRemoteAuthentOauthController;
+use Combodo\iTop\OAuthClient\Controller\AjaxOauthClientController;
require_once(APPROOT.'application/startup.inc.php');
if (version_compare(ITOP_DESIGN_LATEST_VERSION , '3.0') >= 0) {
- $sTemplates = MODULESROOT.'itop-remote-authent-oauth/templates';
+ $sTemplates = MODULESROOT.'itop-oauth-client/templates';
} else {
- $sTemplates = MODULESROOT.'itop-remote-authent-oauth/templates/legacy';
+ $sTemplates = MODULESROOT.'itop-oauth-client/templates/legacy';
}
-$oUpdateController = new AjaxRemoteAuthentOauthController($sTemplates, 'itop-remote-authent-oauth');
+$oUpdateController = new AjaxOauthClientController($sTemplates, 'itop-oauth-client');
$oUpdateController->AllowOnlyAdmin();
$oUpdateController->SetDefaultOperation('CreateMailbox');
$oUpdateController->HandleOperation();
diff --git a/datamodels/2.x/itop-remote-authent-oauth/assets/img/icons8-azure.svg b/datamodels/2.x/itop-oauth-client/assets/img/icons8-azure.svg
similarity index 100%
rename from datamodels/2.x/itop-remote-authent-oauth/assets/img/icons8-azure.svg
rename to datamodels/2.x/itop-oauth-client/assets/img/icons8-azure.svg
diff --git a/datamodels/2.x/itop-remote-authent-oauth/assets/img/icons8-google.svg b/datamodels/2.x/itop-oauth-client/assets/img/icons8-google.svg
similarity index 100%
rename from datamodels/2.x/itop-remote-authent-oauth/assets/img/icons8-google.svg
rename to datamodels/2.x/itop-oauth-client/assets/img/icons8-google.svg
diff --git a/datamodels/2.x/itop-remote-authent-oauth/assets/js/oauth_connect.js b/datamodels/2.x/itop-oauth-client/assets/js/oauth_connect.js
similarity index 100%
rename from datamodels/2.x/itop-remote-authent-oauth/assets/js/oauth_connect.js
rename to datamodels/2.x/itop-oauth-client/assets/js/oauth_connect.js
diff --git a/datamodels/2.x/itop-remote-authent-oauth/composer.json b/datamodels/2.x/itop-oauth-client/composer.json
similarity index 70%
rename from datamodels/2.x/itop-remote-authent-oauth/composer.json
rename to datamodels/2.x/itop-oauth-client/composer.json
index 4dce44506..f12b85530 100644
--- a/datamodels/2.x/itop-remote-authent-oauth/composer.json
+++ b/datamodels/2.x/itop-oauth-client/composer.json
@@ -4,10 +4,10 @@
},
"autoload": {
"psr-4": {
- "Combodo\\iTop\\RemoteAuthentOAuth\\": "src"
+ "Combodo\\iTop\\OAuthClient\\": "src"
}
},
- "name": "combodo/itop-remote-authent-oauth",
+ "name": "combodo/itop-oauth-client",
"type": "itop-extension",
"description": "Remote authentication for OAuth 2.0",
"require": {
diff --git a/datamodels/2.x/itop-oauth-client/cs.dict.itop-oauth-client.php b/datamodels/2.x/itop-oauth-client/cs.dict.itop-oauth-client.php
new file mode 100644
index 000000000..8c39b6ed0
--- /dev/null
+++ b/datamodels/2.x/itop-oauth-client/cs.dict.itop-oauth-client.php
@@ -0,0 +1,74 @@
+ 'Create a mailbox...~~',
+ 'Menu:OAuthClient' => 'OAuth Client~~',
+ 'Menu:OAuthClient+' => '~~',
+ 'Menu:GenerateTokens' => 'Generate access tokens...~~',
+ 'Menu:RegenerateTokens' => 'Regenerate access tokens...~~',
+
+ 'itop-oauth-client/Operation:CreateMailBox/Title' => 'Mailbox creation~~',
+
+ 'itop-oauth-client:UsedForSMTP' => 'This OAuth client is used for SMTP~~',
+ 'itop-oauth-client:TestSMTP' => 'Email send test~~',
+ 'itop-oauth-client:MissingOAuthClient' => 'Missing Oauth client for user name %1$s~~',
+ 'itop-oauth-client:Message:OAuthClientCreated' => 'Generate access tokens before using this OAuth client~~',
+ 'itop-oauth-client:Message:TokenCreated' => 'Access token created~~',
+ 'itop-oauth-client:Message:TokenRecreated' => 'Access token regenerated~~',
+]);
+
+//
+// Class: OAuthClient
+//
+
+Dict::Add('CS CZ', 'Czech', 'Čeština', [
+ 'Class:OAuthClient' => 'Oauth Client~~',
+ 'Class:OAuthClient/Attribute:provider' => 'Provider~~',
+ 'Class:OAuthClient/Attribute:provider+' => '~~',
+ 'Class:OAuthClient/Attribute:name' => 'Login~~',
+ 'Class:OAuthClient/Attribute:name+' => '~~',
+ 'Class:OAuthClient/Attribute:scope' => 'Scope~~',
+ 'Class:OAuthClient/Attribute:scope+' => '~~',
+ 'Class:OAuthClient/Attribute:description' => 'Description~~',
+ 'Class:OAuthClient/Attribute:description+' => '~~',
+ 'Class:OAuthClient/Attribute:client_id' => 'Client id~~',
+ 'Class:OAuthClient/Attribute:client_id+' => '~~',
+ 'Class:OAuthClient/Attribute:client_secret' => 'Client secret~~',
+ 'Class:OAuthClient/Attribute:client_secret+' => '~~',
+ 'Class:OAuthClient/Attribute:refresh_token' => 'Refresh token~~',
+ 'Class:OAuthClient/Attribute:refresh_token+' => '~~',
+ 'Class:OAuthClient/Attribute:refresh_token_expiration' => 'Refresh token expiration~~',
+ 'Class:OAuthClient/Attribute:refresh_token_expiration+' => '~~',
+ 'Class:OAuthClient/Attribute:token' => 'Access token~~',
+ 'Class:OAuthClient/Attribute:token+' => '~~',
+ 'Class:OAuthClient/Attribute:token_expiration' => 'Access token expiration~~',
+ 'Class:OAuthClient/Attribute:token_expiration+' => '~~',
+ 'Class:OAuthClient/Attribute:redirect_url' => 'Redirect url~~',
+ 'Class:OAuthClient/Attribute:redirect_url+' => '~~',
+ 'Class:OAuthClient/Attribute:mailbox_list' => 'Mailbox list~~',
+ 'Class:OAuthClient/Attribute:mailbox_list+' => '~~',
+]);
+
+//
+// Class: OAuthClientAzure
+//
+Dict::Add('CS CZ', 'Czech', 'Čeština', [
+ 'Class:OAuthClientAzure' => 'OAuth client for Microsoft Azure~~',
+ 'Class:OAuthClientAzure/Name' => '%1$s (%2$s)~~',
+
+]);
+
+//
+// Class: OAuthClientGoogle
+//
+Dict::Add('CS CZ', 'Czech', 'Čeština', [
+ 'Class:OAuthClientGoogle' => 'OAuth client for Google~~',
+ 'Class:OAuthClientGoogle/Name' => '%1$s (%2$s)~~',
+]);
+
diff --git a/datamodels/2.x/itop-oauth-client/da.dict.itop-oauth-client.php b/datamodels/2.x/itop-oauth-client/da.dict.itop-oauth-client.php
new file mode 100644
index 000000000..114601d07
--- /dev/null
+++ b/datamodels/2.x/itop-oauth-client/da.dict.itop-oauth-client.php
@@ -0,0 +1,74 @@
+ 'Create a mailbox...~~',
+ 'Menu:OAuthClient' => 'OAuth Client~~',
+ 'Menu:OAuthClient+' => '~~',
+ 'Menu:GenerateTokens' => 'Generate access tokens...~~',
+ 'Menu:RegenerateTokens' => 'Regenerate access tokens...~~',
+
+ 'itop-oauth-client/Operation:CreateMailBox/Title' => 'Mailbox creation~~',
+
+ 'itop-oauth-client:UsedForSMTP' => 'This OAuth client is used for SMTP~~',
+ 'itop-oauth-client:TestSMTP' => 'Email send test~~',
+ 'itop-oauth-client:MissingOAuthClient' => 'Missing Oauth client for user name %1$s~~',
+ 'itop-oauth-client:Message:OAuthClientCreated' => 'Generate access tokens before using this OAuth client~~',
+ 'itop-oauth-client:Message:TokenCreated' => 'Access token created~~',
+ 'itop-oauth-client:Message:TokenRecreated' => 'Access token regenerated~~',
+]);
+
+//
+// Class: OAuthClient
+//
+
+Dict::Add('DA DA', 'Danish', 'Dansk', [
+ 'Class:OAuthClient' => 'Oauth Client~~',
+ 'Class:OAuthClient/Attribute:provider' => 'Provider~~',
+ 'Class:OAuthClient/Attribute:provider+' => '~~',
+ 'Class:OAuthClient/Attribute:name' => 'Login~~',
+ 'Class:OAuthClient/Attribute:name+' => '~~',
+ 'Class:OAuthClient/Attribute:scope' => 'Scope~~',
+ 'Class:OAuthClient/Attribute:scope+' => '~~',
+ 'Class:OAuthClient/Attribute:description' => 'Description~~',
+ 'Class:OAuthClient/Attribute:description+' => '~~',
+ 'Class:OAuthClient/Attribute:client_id' => 'Client id~~',
+ 'Class:OAuthClient/Attribute:client_id+' => '~~',
+ 'Class:OAuthClient/Attribute:client_secret' => 'Client secret~~',
+ 'Class:OAuthClient/Attribute:client_secret+' => '~~',
+ 'Class:OAuthClient/Attribute:refresh_token' => 'Refresh token~~',
+ 'Class:OAuthClient/Attribute:refresh_token+' => '~~',
+ 'Class:OAuthClient/Attribute:refresh_token_expiration' => 'Refresh token expiration~~',
+ 'Class:OAuthClient/Attribute:refresh_token_expiration+' => '~~',
+ 'Class:OAuthClient/Attribute:token' => 'Access token~~',
+ 'Class:OAuthClient/Attribute:token+' => '~~',
+ 'Class:OAuthClient/Attribute:token_expiration' => 'Access token expiration~~',
+ 'Class:OAuthClient/Attribute:token_expiration+' => '~~',
+ 'Class:OAuthClient/Attribute:redirect_url' => 'Redirect url~~',
+ 'Class:OAuthClient/Attribute:redirect_url+' => '~~',
+ 'Class:OAuthClient/Attribute:mailbox_list' => 'Mailbox list~~',
+ 'Class:OAuthClient/Attribute:mailbox_list+' => '~~',
+]);
+
+//
+// Class: OAuthClientAzure
+//
+Dict::Add('DA DA', 'Danish', 'Dansk', [
+ 'Class:OAuthClientAzure' => 'OAuth client for Microsoft Azure~~',
+ 'Class:OAuthClientAzure/Name' => '%1$s (%2$s)~~',
+
+]);
+
+//
+// Class: OAuthClientGoogle
+//
+Dict::Add('DA DA', 'Danish', 'Dansk', [
+ 'Class:OAuthClientGoogle' => 'OAuth client for Google~~',
+ 'Class:OAuthClientGoogle/Name' => '%1$s (%2$s)~~',
+]);
+
diff --git a/datamodels/2.x/itop-remote-authent-oauth/datamodel.itop-remote-authent-oauth.xml b/datamodels/2.x/itop-oauth-client/datamodel.itop-oauth-client.xml
similarity index 80%
rename from datamodels/2.x/itop-remote-authent-oauth/datamodel.itop-remote-authent-oauth.xml
rename to datamodels/2.x/itop-oauth-client/datamodel.itop-oauth-client.xml
index cac68d114..d72135c7c 100644
--- a/datamodels/2.x/itop-remote-authent-oauth/datamodel.itop-remote-authent-oauth.xml
+++ b/datamodels/2.x/itop-oauth-client/datamodel.itop-oauth-client.xml
@@ -2,13 +2,13 @@
-
+
cmdbAbstractObject
cloud,searchable
true
autoincrement
- priv_remote_authent_oauth
+ priv_oauth_client
id
@@ -25,27 +25,6 @@
-
-
-
-
-
-
- false
- true
-
-
-
-
-
-
-
-
-
- false
- true
-
-
@@ -58,11 +37,6 @@
false
-
- scope
-
- true
-
description
@@ -110,7 +84,7 @@
MailInboxOAuth
- remote_authent_oauth_id
+ oauth_client_id
0
0
@@ -126,9 +100,10 @@
parent::DisplayBareHeader($oPage, $bEditMode);
if (!$bEditMode) {
$oConfig = utils::GetConfig();
- if ($oConfig->Get('email_transport_smtp.username') == $this->Get('name')) {
- $sLabel = Dict::S('itop-remote-authent-oauth:UsedForSMTP');
- $sTestLabel = Dict::S('itop-remote-authent-oauth:TestSMTP');
+ $sScope = $this->Get('scope');
+ if (($sScope == 'SMTP' || $sScope == 'EMail') && $oConfig->Get('email_transport_smtp.username') == $this->Get('name')) {
+ $sLabel = Dict::S('itop-oauth-client:UsedForSMTP');
+ $sTestLabel = Dict::S('itop-oauth-client:TestSMTP');
$sTestURL = utils::GetAbsoluteUrlAppRoot().'setup/email.test.php';
$oPage->p("$sLabel $sTestLabel");
}
@@ -169,9 +144,6 @@
-
3
- -
- 4
-
-
5
@@ -210,10 +182,14 @@
-
diff --git a/datamodels/2.x/itop-oauth-client/de.dict.itop-oauth-client.php b/datamodels/2.x/itop-oauth-client/de.dict.itop-oauth-client.php
new file mode 100644
index 000000000..64fc43000
--- /dev/null
+++ b/datamodels/2.x/itop-oauth-client/de.dict.itop-oauth-client.php
@@ -0,0 +1,74 @@
+ 'Create a mailbox...~~',
+ 'Menu:OAuthClient' => 'OAuth Client~~',
+ 'Menu:OAuthClient+' => '~~',
+ 'Menu:GenerateTokens' => 'Generate access tokens...~~',
+ 'Menu:RegenerateTokens' => 'Regenerate access tokens...~~',
+
+ 'itop-oauth-client/Operation:CreateMailBox/Title' => 'Mailbox creation~~',
+
+ 'itop-oauth-client:UsedForSMTP' => 'This OAuth client is used for SMTP~~',
+ 'itop-oauth-client:TestSMTP' => 'Email send test~~',
+ 'itop-oauth-client:MissingOAuthClient' => 'Missing Oauth client for user name %1$s~~',
+ 'itop-oauth-client:Message:OAuthClientCreated' => 'Generate access tokens before using this OAuth client~~',
+ 'itop-oauth-client:Message:TokenCreated' => 'Access token created~~',
+ 'itop-oauth-client:Message:TokenRecreated' => 'Access token regenerated~~',
+]);
+
+//
+// Class: OAuthClient
+//
+
+Dict::Add('DE DE', 'German', 'Deutsch', [
+ 'Class:OAuthClient' => 'Oauth Client~~',
+ 'Class:OAuthClient/Attribute:provider' => 'Provider~~',
+ 'Class:OAuthClient/Attribute:provider+' => '~~',
+ 'Class:OAuthClient/Attribute:name' => 'Login~~',
+ 'Class:OAuthClient/Attribute:name+' => '~~',
+ 'Class:OAuthClient/Attribute:scope' => 'Scope~~',
+ 'Class:OAuthClient/Attribute:scope+' => '~~',
+ 'Class:OAuthClient/Attribute:description' => 'Description~~',
+ 'Class:OAuthClient/Attribute:description+' => '~~',
+ 'Class:OAuthClient/Attribute:client_id' => 'Client id~~',
+ 'Class:OAuthClient/Attribute:client_id+' => '~~',
+ 'Class:OAuthClient/Attribute:client_secret' => 'Client secret~~',
+ 'Class:OAuthClient/Attribute:client_secret+' => '~~',
+ 'Class:OAuthClient/Attribute:refresh_token' => 'Refresh token~~',
+ 'Class:OAuthClient/Attribute:refresh_token+' => '~~',
+ 'Class:OAuthClient/Attribute:refresh_token_expiration' => 'Refresh token expiration~~',
+ 'Class:OAuthClient/Attribute:refresh_token_expiration+' => '~~',
+ 'Class:OAuthClient/Attribute:token' => 'Access token~~',
+ 'Class:OAuthClient/Attribute:token+' => '~~',
+ 'Class:OAuthClient/Attribute:token_expiration' => 'Access token expiration~~',
+ 'Class:OAuthClient/Attribute:token_expiration+' => '~~',
+ 'Class:OAuthClient/Attribute:redirect_url' => 'Redirect url~~',
+ 'Class:OAuthClient/Attribute:redirect_url+' => '~~',
+ 'Class:OAuthClient/Attribute:mailbox_list' => 'Mailbox list~~',
+ 'Class:OAuthClient/Attribute:mailbox_list+' => '~~',
+]);
+
+//
+// Class: OAuthClientAzure
+//
+Dict::Add('DE DE', 'German', 'Deutsch', [
+ 'Class:OAuthClientAzure' => 'OAuth client for Microsoft Azure~~',
+ 'Class:OAuthClientAzure/Name' => '%1$s (%2$s)~~',
+
+]);
+
+//
+// Class: OAuthClientGoogle
+//
+Dict::Add('DE DE', 'German', 'Deutsch', [
+ 'Class:OAuthClientGoogle' => 'OAuth client for Google~~',
+ 'Class:OAuthClientGoogle/Name' => '%1$s (%2$s)~~',
+]);
+
diff --git a/datamodels/2.x/itop-oauth-client/en.dict.itop-oauth-client.php b/datamodels/2.x/itop-oauth-client/en.dict.itop-oauth-client.php
new file mode 100644
index 000000000..c1126294b
--- /dev/null
+++ b/datamodels/2.x/itop-oauth-client/en.dict.itop-oauth-client.php
@@ -0,0 +1,74 @@
+ 'Create a mailbox...',
+ 'Menu:OAuthClient' => 'OAuth Client',
+ 'Menu:OAuthClient+' => '',
+ 'Menu:GenerateTokens' => 'Generate access tokens...',
+ 'Menu:RegenerateTokens' => 'Regenerate access tokens...',
+
+ 'itop-oauth-client/Operation:CreateMailBox/Title' => 'Mailbox creation',
+
+ 'itop-oauth-client:UsedForSMTP' => 'This OAuth client is used for SMTP',
+ 'itop-oauth-client:TestSMTP' => 'Email send test',
+ 'itop-oauth-client:MissingOAuthClient' => 'Missing Oauth client for user name %1$s',
+ 'itop-oauth-client:Message:OAuthClientCreated' => 'Generate access tokens before using this OAuth client',
+ 'itop-oauth-client:Message:TokenCreated' => 'Access token created',
+ 'itop-oauth-client:Message:TokenRecreated' => 'Access token regenerated',
+]);
+
+//
+// Class: OAuthClient
+//
+
+Dict::Add('EN US', 'English', 'English', [
+ 'Class:OAuthClient' => 'Oauth Client',
+ 'Class:OAuthClient/Attribute:provider' => 'Provider',
+ 'Class:OAuthClient/Attribute:provider+' => '',
+ 'Class:OAuthClient/Attribute:name' => 'Login',
+ 'Class:OAuthClient/Attribute:name+' => '',
+ 'Class:OAuthClient/Attribute:scope' => 'Scope',
+ 'Class:OAuthClient/Attribute:scope+' => '',
+ 'Class:OAuthClient/Attribute:description' => 'Description',
+ 'Class:OAuthClient/Attribute:description+' => '',
+ 'Class:OAuthClient/Attribute:client_id' => 'Client id',
+ 'Class:OAuthClient/Attribute:client_id+' => '',
+ 'Class:OAuthClient/Attribute:client_secret' => 'Client secret',
+ 'Class:OAuthClient/Attribute:client_secret+' => '',
+ 'Class:OAuthClient/Attribute:refresh_token' => 'Refresh token',
+ 'Class:OAuthClient/Attribute:refresh_token+' => '',
+ 'Class:OAuthClient/Attribute:refresh_token_expiration' => 'Refresh token expiration',
+ 'Class:OAuthClient/Attribute:refresh_token_expiration+' => '',
+ 'Class:OAuthClient/Attribute:token' => 'Access token',
+ 'Class:OAuthClient/Attribute:token+' => '',
+ 'Class:OAuthClient/Attribute:token_expiration' => 'Access token expiration',
+ 'Class:OAuthClient/Attribute:token_expiration+' => '',
+ 'Class:OAuthClient/Attribute:redirect_url' => 'Redirect url',
+ 'Class:OAuthClient/Attribute:redirect_url+' => '',
+ 'Class:OAuthClient/Attribute:mailbox_list' => 'Mailbox list',
+ 'Class:OAuthClient/Attribute:mailbox_list+' => '',
+]);
+
+//
+// Class: OAuthClientAzure
+//
+Dict::Add('EN US', 'English', 'English', [
+ 'Class:OAuthClientAzure' => 'OAuth client for Microsoft Azure',
+ 'Class:OAuthClientAzure/Name' => '%1$s (%2$s)',
+
+]);
+
+//
+// Class: OAuthClientGoogle
+//
+Dict::Add('EN US', 'English', 'English', [
+ 'Class:OAuthClientGoogle' => 'OAuth client for Google',
+ 'Class:OAuthClientGoogle/Name' => '%1$s (%2$s)',
+]);
+
diff --git a/datamodels/2.x/itop-oauth-client/es_cr.dict.itop-oauth-client.php b/datamodels/2.x/itop-oauth-client/es_cr.dict.itop-oauth-client.php
new file mode 100644
index 000000000..c91218460
--- /dev/null
+++ b/datamodels/2.x/itop-oauth-client/es_cr.dict.itop-oauth-client.php
@@ -0,0 +1,74 @@
+ 'Create a mailbox...~~',
+ 'Menu:OAuthClient' => 'OAuth Client~~',
+ 'Menu:OAuthClient+' => '~~',
+ 'Menu:GenerateTokens' => 'Generate access tokens...~~',
+ 'Menu:RegenerateTokens' => 'Regenerate access tokens...~~',
+
+ 'itop-oauth-client/Operation:CreateMailBox/Title' => 'Mailbox creation~~',
+
+ 'itop-oauth-client:UsedForSMTP' => 'This OAuth client is used for SMTP~~',
+ 'itop-oauth-client:TestSMTP' => 'Email send test~~',
+ 'itop-oauth-client:MissingOAuthClient' => 'Missing Oauth client for user name %1$s~~',
+ 'itop-oauth-client:Message:OAuthClientCreated' => 'Generate access tokens before using this OAuth client~~',
+ 'itop-oauth-client:Message:TokenCreated' => 'Access token created~~',
+ 'itop-oauth-client:Message:TokenRecreated' => 'Access token regenerated~~',
+]);
+
+//
+// Class: OAuthClient
+//
+
+Dict::Add('ES CR', 'Spanish', 'Español, Castellaño', [
+ 'Class:OAuthClient' => 'Oauth Client~~',
+ 'Class:OAuthClient/Attribute:provider' => 'Provider~~',
+ 'Class:OAuthClient/Attribute:provider+' => '~~',
+ 'Class:OAuthClient/Attribute:name' => 'Login~~',
+ 'Class:OAuthClient/Attribute:name+' => '~~',
+ 'Class:OAuthClient/Attribute:scope' => 'Scope~~',
+ 'Class:OAuthClient/Attribute:scope+' => '~~',
+ 'Class:OAuthClient/Attribute:description' => 'Description~~',
+ 'Class:OAuthClient/Attribute:description+' => '~~',
+ 'Class:OAuthClient/Attribute:client_id' => 'Client id~~',
+ 'Class:OAuthClient/Attribute:client_id+' => '~~',
+ 'Class:OAuthClient/Attribute:client_secret' => 'Client secret~~',
+ 'Class:OAuthClient/Attribute:client_secret+' => '~~',
+ 'Class:OAuthClient/Attribute:refresh_token' => 'Refresh token~~',
+ 'Class:OAuthClient/Attribute:refresh_token+' => '~~',
+ 'Class:OAuthClient/Attribute:refresh_token_expiration' => 'Refresh token expiration~~',
+ 'Class:OAuthClient/Attribute:refresh_token_expiration+' => '~~',
+ 'Class:OAuthClient/Attribute:token' => 'Access token~~',
+ 'Class:OAuthClient/Attribute:token+' => '~~',
+ 'Class:OAuthClient/Attribute:token_expiration' => 'Access token expiration~~',
+ 'Class:OAuthClient/Attribute:token_expiration+' => '~~',
+ 'Class:OAuthClient/Attribute:redirect_url' => 'Redirect url~~',
+ 'Class:OAuthClient/Attribute:redirect_url+' => '~~',
+ 'Class:OAuthClient/Attribute:mailbox_list' => 'Mailbox list~~',
+ 'Class:OAuthClient/Attribute:mailbox_list+' => '~~',
+]);
+
+//
+// Class: OAuthClientAzure
+//
+Dict::Add('ES CR', 'Spanish', 'Español, Castellaño', [
+ 'Class:OAuthClientAzure' => 'OAuth client for Microsoft Azure~~',
+ 'Class:OAuthClientAzure/Name' => '%1$s (%2$s)~~',
+
+]);
+
+//
+// Class: OAuthClientGoogle
+//
+Dict::Add('ES CR', 'Spanish', 'Español, Castellaño', [
+ 'Class:OAuthClientGoogle' => 'OAuth client for Google~~',
+ 'Class:OAuthClientGoogle/Name' => '%1$s (%2$s)~~',
+]);
+
diff --git a/datamodels/2.x/itop-oauth-client/fr.dict.itop-oauth-client.php b/datamodels/2.x/itop-oauth-client/fr.dict.itop-oauth-client.php
new file mode 100644
index 000000000..d8dec5d33
--- /dev/null
+++ b/datamodels/2.x/itop-oauth-client/fr.dict.itop-oauth-client.php
@@ -0,0 +1,78 @@
+ 'Créer une boite mail...',
+ 'Menu:OAuthClient' => 'Client OAuth',
+ 'Menu:OAuthClient+' => '',
+ 'Menu:GenerateTokens' => 'Créer un jeton d\'accès...',
+ 'Menu:RegenerateTokens' => 'Recréer un jeton d\'accès..',
+
+ 'itop-oauth-client/Operation:CreateMailBox/Title' => 'Création de boite mail',
+
+ 'itop-oauth-client:UsedForSMTP' => 'Ce client Oauth est utilisé pour SMTP',
+ 'itop-oauth-client:TestSMTP' => 'Tester l\'envoi de mail',
+ 'itop-oauth-client:MissingOAuthClient' => 'Il n\'y a pas de client OAuth pour l\'utilisateur %1$s',
+ 'itop-oauth-client:Message:OAuthClientCreated' => 'Générez les jetons d\'accès avant d\'utiliser cd client OAuth',
+ 'itop-oauth-client:Message:TokenCreated' => 'Le jeton d\'accès à été créé',
+ 'itop-oauth-client:Message:TokenRecreated' => 'Le jeton d\'accès à été renouvelé',
+]);
+
+//
+// Class: OAuthClient
+//
+
+Dict::Add('FR FR', 'French', 'Français', [
+ 'Class:OAuthClient' => 'Client OAuth',
+ 'Class:OAuthClient/Attribute:provider' => 'Fournisseur',
+ 'Class:OAuthClient/Attribute:provider+' => '',
+ 'Class:OAuthClient/Attribute:name' => 'Login',
+ 'Class:OAuthClient/Attribute:name+' => '',
+ 'Class:OAuthClient/Attribute:scope' => 'Niveaux d\'accès',
+ 'Class:OAuthClient/Attribute:scope+' => '',
+ 'Class:OAuthClient/Attribute:description' => 'Description',
+ 'Class:OAuthClient/Attribute:description+' => '',
+ 'Class:OAuthClient/Attribute:client_id' => 'ID Client',
+ 'Class:OAuthClient/Attribute:client_id+' => '',
+ 'Class:OAuthClient/Attribute:client_secret' => 'Code secret du client',
+ 'Class:OAuthClient/Attribute:client_secret+' => '',
+ 'Class:OAuthClient/Attribute:refresh_token' => 'Jeton de renouvellement',
+ 'Class:OAuthClient/Attribute:refresh_token+' => '',
+ 'Class:OAuthClient/Attribute:refresh_token_expiration' => 'Date d\'expiration du jeton de renouvellement',
+ 'Class:OAuthClient/Attribute:refresh_token_expiration+' => '',
+ 'Class:OAuthClient/Attribute:token' => 'Jeton d\'accès',
+ 'Class:OAuthClient/Attribute:token+' => '',
+ 'Class:OAuthClient/Attribute:token_expiration' => 'Date d\'expiration du jeton d\'accès',
+ 'Class:OAuthClient/Attribute:token_expiration+' => '',
+ 'Class:OAuthClient/Attribute:redirect_url' => 'URL de redirection',
+ 'Class:OAuthClient/Attribute:redirect_url+' => '',
+ 'Class:OAuthClient/Attribute:mailbox_list' => 'Mailbox list',
+ 'Class:OAuthClient/Attribute:mailbox_list+' => '',
+]);
+
+//
+// Class: OAuthClientAzure
+//
+Dict::Add('FR FR', 'French', 'Français', [
+ 'Class:OAuthClientAzure' => 'Client OAuth pour Microsoft Azure',
+ 'Class:OAuthClientAzure/Name' => '%1$s (%2$s)',
+
+]);
+
+//
+// Class: OAuthClientGoogle
+//
+Dict::Add('FR FR', 'French', 'Français', [
+ 'Class:OAuthClientGoogle' => 'Client OAuth pour Google',
+ 'Class:OAuthClientGoogle/Name' => '%1$s (%2$s)',
+]);
+
+
+// Additional language entries not present in English dict
+Dict::Add('FR FR', 'French', 'Français', array(
+ 'Class:OAuthClient/Name' => '%1$s-%%2$~',
+));
diff --git a/datamodels/2.x/itop-oauth-client/hu.dict.itop-oauth-client.php b/datamodels/2.x/itop-oauth-client/hu.dict.itop-oauth-client.php
new file mode 100644
index 000000000..02474d82a
--- /dev/null
+++ b/datamodels/2.x/itop-oauth-client/hu.dict.itop-oauth-client.php
@@ -0,0 +1,74 @@
+ 'Create a mailbox...~~',
+ 'Menu:OAuthClient' => 'OAuth Client~~',
+ 'Menu:OAuthClient+' => '~~',
+ 'Menu:GenerateTokens' => 'Generate access tokens...~~',
+ 'Menu:RegenerateTokens' => 'Regenerate access tokens...~~',
+
+ 'itop-oauth-client/Operation:CreateMailBox/Title' => 'Mailbox creation~~',
+
+ 'itop-oauth-client:UsedForSMTP' => 'This OAuth client is used for SMTP~~',
+ 'itop-oauth-client:TestSMTP' => 'Email send test~~',
+ 'itop-oauth-client:MissingOAuthClient' => 'Missing Oauth client for user name %1$s~~',
+ 'itop-oauth-client:Message:OAuthClientCreated' => 'Generate access tokens before using this OAuth client~~',
+ 'itop-oauth-client:Message:TokenCreated' => 'Access token created~~',
+ 'itop-oauth-client:Message:TokenRecreated' => 'Access token regenerated~~',
+]);
+
+//
+// Class: OAuthClient
+//
+
+Dict::Add('HU HU', 'Hungarian', 'Magyar', [
+ 'Class:OAuthClient' => 'Oauth Client~~',
+ 'Class:OAuthClient/Attribute:provider' => 'Provider~~',
+ 'Class:OAuthClient/Attribute:provider+' => '~~',
+ 'Class:OAuthClient/Attribute:name' => 'Login~~',
+ 'Class:OAuthClient/Attribute:name+' => '~~',
+ 'Class:OAuthClient/Attribute:scope' => 'Scope~~',
+ 'Class:OAuthClient/Attribute:scope+' => '~~',
+ 'Class:OAuthClient/Attribute:description' => 'Description~~',
+ 'Class:OAuthClient/Attribute:description+' => '~~',
+ 'Class:OAuthClient/Attribute:client_id' => 'Client id~~',
+ 'Class:OAuthClient/Attribute:client_id+' => '~~',
+ 'Class:OAuthClient/Attribute:client_secret' => 'Client secret~~',
+ 'Class:OAuthClient/Attribute:client_secret+' => '~~',
+ 'Class:OAuthClient/Attribute:refresh_token' => 'Refresh token~~',
+ 'Class:OAuthClient/Attribute:refresh_token+' => '~~',
+ 'Class:OAuthClient/Attribute:refresh_token_expiration' => 'Refresh token expiration~~',
+ 'Class:OAuthClient/Attribute:refresh_token_expiration+' => '~~',
+ 'Class:OAuthClient/Attribute:token' => 'Access token~~',
+ 'Class:OAuthClient/Attribute:token+' => '~~',
+ 'Class:OAuthClient/Attribute:token_expiration' => 'Access token expiration~~',
+ 'Class:OAuthClient/Attribute:token_expiration+' => '~~',
+ 'Class:OAuthClient/Attribute:redirect_url' => 'Redirect url~~',
+ 'Class:OAuthClient/Attribute:redirect_url+' => '~~',
+ 'Class:OAuthClient/Attribute:mailbox_list' => 'Mailbox list~~',
+ 'Class:OAuthClient/Attribute:mailbox_list+' => '~~',
+]);
+
+//
+// Class: OAuthClientAzure
+//
+Dict::Add('HU HU', 'Hungarian', 'Magyar', [
+ 'Class:OAuthClientAzure' => 'OAuth client for Microsoft Azure~~',
+ 'Class:OAuthClientAzure/Name' => '%1$s (%2$s)~~',
+
+]);
+
+//
+// Class: OAuthClientGoogle
+//
+Dict::Add('HU HU', 'Hungarian', 'Magyar', [
+ 'Class:OAuthClientGoogle' => 'OAuth client for Google~~',
+ 'Class:OAuthClientGoogle/Name' => '%1$s (%2$s)~~',
+]);
+
diff --git a/datamodels/2.x/itop-remote-authent-oauth/index.php b/datamodels/2.x/itop-oauth-client/index.php
similarity index 52%
rename from datamodels/2.x/itop-remote-authent-oauth/index.php
rename to datamodels/2.x/itop-oauth-client/index.php
index eb7364ca7..4078be629 100644
--- a/datamodels/2.x/itop-remote-authent-oauth/index.php
+++ b/datamodels/2.x/itop-oauth-client/index.php
@@ -4,19 +4,19 @@
* @license http://opensource.org/licenses/AGPL-3.0
*/
-namespace Combodo\iTop\RemoteAuthentOAuth;
+namespace Combodo\iTop\OAuthClient;
-use Combodo\iTop\RemoteAuthentOAuth\Controller\RemoteAuthentOauthController;
+use Combodo\iTop\OAuthClient\Controller\OAuthClientController;
require_once(APPROOT.'application/startup.inc.php');
if (version_compare(ITOP_DESIGN_LATEST_VERSION , '3.0') >= 0) {
- $sTemplates = MODULESROOT.'itop-remote-authent-oauth/templates';
+ $sTemplates = MODULESROOT.'itop-oauth-client/templates';
} else {
- $sTemplates = MODULESROOT.'itop-remote-authent-oauth/templates/legacy';
+ $sTemplates = MODULESROOT.'itop-oauth-client/templates/legacy';
}
-$oUpdateController = new RemoteAuthentOauthController($sTemplates, 'itop-remote-authent-oauth');
+$oUpdateController = new OAuthClientController($sTemplates, 'itop-oauth-client');
$oUpdateController->AllowOnlyAdmin();
$oUpdateController->SetDefaultOperation('CreateMailbox');
$oUpdateController->HandleOperation();
diff --git a/datamodels/2.x/itop-oauth-client/it.dict.itop-oauth-client.php b/datamodels/2.x/itop-oauth-client/it.dict.itop-oauth-client.php
new file mode 100644
index 000000000..45b4c026f
--- /dev/null
+++ b/datamodels/2.x/itop-oauth-client/it.dict.itop-oauth-client.php
@@ -0,0 +1,74 @@
+ 'Create a mailbox...~~',
+ 'Menu:OAuthClient' => 'OAuth Client~~',
+ 'Menu:OAuthClient+' => '~~',
+ 'Menu:GenerateTokens' => 'Generate access tokens...~~',
+ 'Menu:RegenerateTokens' => 'Regenerate access tokens...~~',
+
+ 'itop-oauth-client/Operation:CreateMailBox/Title' => 'Mailbox creation~~',
+
+ 'itop-oauth-client:UsedForSMTP' => 'This OAuth client is used for SMTP~~',
+ 'itop-oauth-client:TestSMTP' => 'Email send test~~',
+ 'itop-oauth-client:MissingOAuthClient' => 'Missing Oauth client for user name %1$s~~',
+ 'itop-oauth-client:Message:OAuthClientCreated' => 'Generate access tokens before using this OAuth client~~',
+ 'itop-oauth-client:Message:TokenCreated' => 'Access token created~~',
+ 'itop-oauth-client:Message:TokenRecreated' => 'Access token regenerated~~',
+]);
+
+//
+// Class: OAuthClient
+//
+
+Dict::Add('IT IT', 'Italian', 'Italiano', [
+ 'Class:OAuthClient' => 'Oauth Client~~',
+ 'Class:OAuthClient/Attribute:provider' => 'Provider~~',
+ 'Class:OAuthClient/Attribute:provider+' => '~~',
+ 'Class:OAuthClient/Attribute:name' => 'Login~~',
+ 'Class:OAuthClient/Attribute:name+' => '~~',
+ 'Class:OAuthClient/Attribute:scope' => 'Scope~~',
+ 'Class:OAuthClient/Attribute:scope+' => '~~',
+ 'Class:OAuthClient/Attribute:description' => 'Description~~',
+ 'Class:OAuthClient/Attribute:description+' => '~~',
+ 'Class:OAuthClient/Attribute:client_id' => 'Client id~~',
+ 'Class:OAuthClient/Attribute:client_id+' => '~~',
+ 'Class:OAuthClient/Attribute:client_secret' => 'Client secret~~',
+ 'Class:OAuthClient/Attribute:client_secret+' => '~~',
+ 'Class:OAuthClient/Attribute:refresh_token' => 'Refresh token~~',
+ 'Class:OAuthClient/Attribute:refresh_token+' => '~~',
+ 'Class:OAuthClient/Attribute:refresh_token_expiration' => 'Refresh token expiration~~',
+ 'Class:OAuthClient/Attribute:refresh_token_expiration+' => '~~',
+ 'Class:OAuthClient/Attribute:token' => 'Access token~~',
+ 'Class:OAuthClient/Attribute:token+' => '~~',
+ 'Class:OAuthClient/Attribute:token_expiration' => 'Access token expiration~~',
+ 'Class:OAuthClient/Attribute:token_expiration+' => '~~',
+ 'Class:OAuthClient/Attribute:redirect_url' => 'Redirect url~~',
+ 'Class:OAuthClient/Attribute:redirect_url+' => '~~',
+ 'Class:OAuthClient/Attribute:mailbox_list' => 'Mailbox list~~',
+ 'Class:OAuthClient/Attribute:mailbox_list+' => '~~',
+]);
+
+//
+// Class: OAuthClientAzure
+//
+Dict::Add('IT IT', 'Italian', 'Italiano', [
+ 'Class:OAuthClientAzure' => 'OAuth client for Microsoft Azure~~',
+ 'Class:OAuthClientAzure/Name' => '%1$s (%2$s)~~',
+
+]);
+
+//
+// Class: OAuthClientGoogle
+//
+Dict::Add('IT IT', 'Italian', 'Italiano', [
+ 'Class:OAuthClientGoogle' => 'OAuth client for Google~~',
+ 'Class:OAuthClientGoogle/Name' => '%1$s (%2$s)~~',
+]);
+
diff --git a/datamodels/2.x/itop-oauth-client/ja.dict.itop-oauth-client.php b/datamodels/2.x/itop-oauth-client/ja.dict.itop-oauth-client.php
new file mode 100644
index 000000000..27155d31d
--- /dev/null
+++ b/datamodels/2.x/itop-oauth-client/ja.dict.itop-oauth-client.php
@@ -0,0 +1,74 @@
+ 'Create a mailbox...~~',
+ 'Menu:OAuthClient' => 'OAuth Client~~',
+ 'Menu:OAuthClient+' => '~~',
+ 'Menu:GenerateTokens' => 'Generate access tokens...~~',
+ 'Menu:RegenerateTokens' => 'Regenerate access tokens...~~',
+
+ 'itop-oauth-client/Operation:CreateMailBox/Title' => 'Mailbox creation~~',
+
+ 'itop-oauth-client:UsedForSMTP' => 'This OAuth client is used for SMTP~~',
+ 'itop-oauth-client:TestSMTP' => 'Email send test~~',
+ 'itop-oauth-client:MissingOAuthClient' => 'Missing Oauth client for user name %1$s~~',
+ 'itop-oauth-client:Message:OAuthClientCreated' => 'Generate access tokens before using this OAuth client~~',
+ 'itop-oauth-client:Message:TokenCreated' => 'Access token created~~',
+ 'itop-oauth-client:Message:TokenRecreated' => 'Access token regenerated~~',
+]);
+
+//
+// Class: OAuthClient
+//
+
+Dict::Add('JA JP', 'Japanese', '日本語', [
+ 'Class:OAuthClient' => 'Oauth Client~~',
+ 'Class:OAuthClient/Attribute:provider' => 'Provider~~',
+ 'Class:OAuthClient/Attribute:provider+' => '~~',
+ 'Class:OAuthClient/Attribute:name' => 'Login~~',
+ 'Class:OAuthClient/Attribute:name+' => '~~',
+ 'Class:OAuthClient/Attribute:scope' => 'Scope~~',
+ 'Class:OAuthClient/Attribute:scope+' => '~~',
+ 'Class:OAuthClient/Attribute:description' => 'Description~~',
+ 'Class:OAuthClient/Attribute:description+' => '~~',
+ 'Class:OAuthClient/Attribute:client_id' => 'Client id~~',
+ 'Class:OAuthClient/Attribute:client_id+' => '~~',
+ 'Class:OAuthClient/Attribute:client_secret' => 'Client secret~~',
+ 'Class:OAuthClient/Attribute:client_secret+' => '~~',
+ 'Class:OAuthClient/Attribute:refresh_token' => 'Refresh token~~',
+ 'Class:OAuthClient/Attribute:refresh_token+' => '~~',
+ 'Class:OAuthClient/Attribute:refresh_token_expiration' => 'Refresh token expiration~~',
+ 'Class:OAuthClient/Attribute:refresh_token_expiration+' => '~~',
+ 'Class:OAuthClient/Attribute:token' => 'Access token~~',
+ 'Class:OAuthClient/Attribute:token+' => '~~',
+ 'Class:OAuthClient/Attribute:token_expiration' => 'Access token expiration~~',
+ 'Class:OAuthClient/Attribute:token_expiration+' => '~~',
+ 'Class:OAuthClient/Attribute:redirect_url' => 'Redirect url~~',
+ 'Class:OAuthClient/Attribute:redirect_url+' => '~~',
+ 'Class:OAuthClient/Attribute:mailbox_list' => 'Mailbox list~~',
+ 'Class:OAuthClient/Attribute:mailbox_list+' => '~~',
+]);
+
+//
+// Class: OAuthClientAzure
+//
+Dict::Add('JA JP', 'Japanese', '日本語', [
+ 'Class:OAuthClientAzure' => 'OAuth client for Microsoft Azure~~',
+ 'Class:OAuthClientAzure/Name' => '%1$s (%2$s)~~',
+
+]);
+
+//
+// Class: OAuthClientGoogle
+//
+Dict::Add('JA JP', 'Japanese', '日本語', [
+ 'Class:OAuthClientGoogle' => 'OAuth client for Google~~',
+ 'Class:OAuthClientGoogle/Name' => '%1$s (%2$s)~~',
+]);
+
diff --git a/datamodels/2.x/itop-remote-authent-oauth/module.itop-remote-authent-oauth.php b/datamodels/2.x/itop-oauth-client/module.itop-oauth-client.php
similarity index 76%
rename from datamodels/2.x/itop-remote-authent-oauth/module.itop-remote-authent-oauth.php
rename to datamodels/2.x/itop-oauth-client/module.itop-oauth-client.php
index 34532dbc1..da18fd953 100644
--- a/datamodels/2.x/itop-remote-authent-oauth/module.itop-remote-authent-oauth.php
+++ b/datamodels/2.x/itop-oauth-client/module.itop-oauth-client.php
@@ -5,11 +5,11 @@
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
- 'itop-remote-authent-oauth/2.7.7',
+ 'itop-oauth-client/2.7.7',
array(
// Identification
//
- 'label' => 'Remote authentication for OAuth 2.0',
+ 'label' => 'OAuth 2.0 client',
'category' => 'business',
// Setup
@@ -24,9 +24,9 @@ SetupWebPage::AddModule(
//
'datamodel' => array(
'vendor/autoload.php',
- 'model.itop-remote-authent-oauth.php', // Contains the PHP code generated by the "compilation" of datamodel.remote-authent-oauth.xml
- 'src/Model/RemoteAuthentOAuthGoogle.php',
- 'src/Model/RemoteAuthentOAuthAzure.php',
+ 'model.itop-oauth-client.php', // Contains the PHP code generated by the "compilation" of datamodel.remote-authent-oauth.xml
+ 'src/Model/OAuthClientGoogle.php',
+ 'src/Model/OAuthClientAzure.php',
'src/Service/PopupMenuExtension.php',
'src/Service/ApplicationObjectExtension.php',
),
diff --git a/datamodels/2.x/itop-oauth-client/nl.dict.itop-oauth-client.php b/datamodels/2.x/itop-oauth-client/nl.dict.itop-oauth-client.php
new file mode 100644
index 000000000..00ecacc32
--- /dev/null
+++ b/datamodels/2.x/itop-oauth-client/nl.dict.itop-oauth-client.php
@@ -0,0 +1,74 @@
+ 'Create a mailbox...~~',
+ 'Menu:OAuthClient' => 'OAuth Client~~',
+ 'Menu:OAuthClient+' => '~~',
+ 'Menu:GenerateTokens' => 'Generate access tokens...~~',
+ 'Menu:RegenerateTokens' => 'Regenerate access tokens...~~',
+
+ 'itop-oauth-client/Operation:CreateMailBox/Title' => 'Mailbox creation~~',
+
+ 'itop-oauth-client:UsedForSMTP' => 'This OAuth client is used for SMTP~~',
+ 'itop-oauth-client:TestSMTP' => 'Email send test~~',
+ 'itop-oauth-client:MissingOAuthClient' => 'Missing Oauth client for user name %1$s~~',
+ 'itop-oauth-client:Message:OAuthClientCreated' => 'Generate access tokens before using this OAuth client~~',
+ 'itop-oauth-client:Message:TokenCreated' => 'Access token created~~',
+ 'itop-oauth-client:Message:TokenRecreated' => 'Access token regenerated~~',
+]);
+
+//
+// Class: OAuthClient
+//
+
+Dict::Add('NL NL', 'Dutch', 'Nederlands', [
+ 'Class:OAuthClient' => 'Oauth Client~~',
+ 'Class:OAuthClient/Attribute:provider' => 'Provider~~',
+ 'Class:OAuthClient/Attribute:provider+' => '~~',
+ 'Class:OAuthClient/Attribute:name' => 'Login~~',
+ 'Class:OAuthClient/Attribute:name+' => '~~',
+ 'Class:OAuthClient/Attribute:scope' => 'Scope~~',
+ 'Class:OAuthClient/Attribute:scope+' => '~~',
+ 'Class:OAuthClient/Attribute:description' => 'Description~~',
+ 'Class:OAuthClient/Attribute:description+' => '~~',
+ 'Class:OAuthClient/Attribute:client_id' => 'Client id~~',
+ 'Class:OAuthClient/Attribute:client_id+' => '~~',
+ 'Class:OAuthClient/Attribute:client_secret' => 'Client secret~~',
+ 'Class:OAuthClient/Attribute:client_secret+' => '~~',
+ 'Class:OAuthClient/Attribute:refresh_token' => 'Refresh token~~',
+ 'Class:OAuthClient/Attribute:refresh_token+' => '~~',
+ 'Class:OAuthClient/Attribute:refresh_token_expiration' => 'Refresh token expiration~~',
+ 'Class:OAuthClient/Attribute:refresh_token_expiration+' => '~~',
+ 'Class:OAuthClient/Attribute:token' => 'Access token~~',
+ 'Class:OAuthClient/Attribute:token+' => '~~',
+ 'Class:OAuthClient/Attribute:token_expiration' => 'Access token expiration~~',
+ 'Class:OAuthClient/Attribute:token_expiration+' => '~~',
+ 'Class:OAuthClient/Attribute:redirect_url' => 'Redirect url~~',
+ 'Class:OAuthClient/Attribute:redirect_url+' => '~~',
+ 'Class:OAuthClient/Attribute:mailbox_list' => 'Mailbox list~~',
+ 'Class:OAuthClient/Attribute:mailbox_list+' => '~~',
+]);
+
+//
+// Class: OAuthClientAzure
+//
+Dict::Add('NL NL', 'Dutch', 'Nederlands', [
+ 'Class:OAuthClientAzure' => 'OAuth client for Microsoft Azure~~',
+ 'Class:OAuthClientAzure/Name' => '%1$s (%2$s)~~',
+
+]);
+
+//
+// Class: OAuthClientGoogle
+//
+Dict::Add('NL NL', 'Dutch', 'Nederlands', [
+ 'Class:OAuthClientGoogle' => 'OAuth client for Google~~',
+ 'Class:OAuthClientGoogle/Name' => '%1$s (%2$s)~~',
+]);
+
diff --git a/datamodels/2.x/itop-oauth-client/pt_br.dict.itop-oauth-client.php b/datamodels/2.x/itop-oauth-client/pt_br.dict.itop-oauth-client.php
new file mode 100644
index 000000000..bb5a05ce5
--- /dev/null
+++ b/datamodels/2.x/itop-oauth-client/pt_br.dict.itop-oauth-client.php
@@ -0,0 +1,74 @@
+ 'Create a mailbox...~~',
+ 'Menu:OAuthClient' => 'OAuth Client~~',
+ 'Menu:OAuthClient+' => '~~',
+ 'Menu:GenerateTokens' => 'Generate access tokens...~~',
+ 'Menu:RegenerateTokens' => 'Regenerate access tokens...~~',
+
+ 'itop-oauth-client/Operation:CreateMailBox/Title' => 'Mailbox creation~~',
+
+ 'itop-oauth-client:UsedForSMTP' => 'This OAuth client is used for SMTP~~',
+ 'itop-oauth-client:TestSMTP' => 'Email send test~~',
+ 'itop-oauth-client:MissingOAuthClient' => 'Missing Oauth client for user name %1$s~~',
+ 'itop-oauth-client:Message:OAuthClientCreated' => 'Generate access tokens before using this OAuth client~~',
+ 'itop-oauth-client:Message:TokenCreated' => 'Access token created~~',
+ 'itop-oauth-client:Message:TokenRecreated' => 'Access token regenerated~~',
+]);
+
+//
+// Class: OAuthClient
+//
+
+Dict::Add('PT BR', 'Brazilian', 'Brazilian', [
+ 'Class:OAuthClient' => 'Oauth Client~~',
+ 'Class:OAuthClient/Attribute:provider' => 'Provider~~',
+ 'Class:OAuthClient/Attribute:provider+' => '~~',
+ 'Class:OAuthClient/Attribute:name' => 'Login~~',
+ 'Class:OAuthClient/Attribute:name+' => '~~',
+ 'Class:OAuthClient/Attribute:scope' => 'Scope~~',
+ 'Class:OAuthClient/Attribute:scope+' => '~~',
+ 'Class:OAuthClient/Attribute:description' => 'Description~~',
+ 'Class:OAuthClient/Attribute:description+' => '~~',
+ 'Class:OAuthClient/Attribute:client_id' => 'Client id~~',
+ 'Class:OAuthClient/Attribute:client_id+' => '~~',
+ 'Class:OAuthClient/Attribute:client_secret' => 'Client secret~~',
+ 'Class:OAuthClient/Attribute:client_secret+' => '~~',
+ 'Class:OAuthClient/Attribute:refresh_token' => 'Refresh token~~',
+ 'Class:OAuthClient/Attribute:refresh_token+' => '~~',
+ 'Class:OAuthClient/Attribute:refresh_token_expiration' => 'Refresh token expiration~~',
+ 'Class:OAuthClient/Attribute:refresh_token_expiration+' => '~~',
+ 'Class:OAuthClient/Attribute:token' => 'Access token~~',
+ 'Class:OAuthClient/Attribute:token+' => '~~',
+ 'Class:OAuthClient/Attribute:token_expiration' => 'Access token expiration~~',
+ 'Class:OAuthClient/Attribute:token_expiration+' => '~~',
+ 'Class:OAuthClient/Attribute:redirect_url' => 'Redirect url~~',
+ 'Class:OAuthClient/Attribute:redirect_url+' => '~~',
+ 'Class:OAuthClient/Attribute:mailbox_list' => 'Mailbox list~~',
+ 'Class:OAuthClient/Attribute:mailbox_list+' => '~~',
+]);
+
+//
+// Class: OAuthClientAzure
+//
+Dict::Add('PT BR', 'Brazilian', 'Brazilian', [
+ 'Class:OAuthClientAzure' => 'OAuth client for Microsoft Azure~~',
+ 'Class:OAuthClientAzure/Name' => '%1$s (%2$s)~~',
+
+]);
+
+//
+// Class: OAuthClientGoogle
+//
+Dict::Add('PT BR', 'Brazilian', 'Brazilian', [
+ 'Class:OAuthClientGoogle' => 'OAuth client for Google~~',
+ 'Class:OAuthClientGoogle/Name' => '%1$s (%2$s)~~',
+]);
+
diff --git a/datamodels/2.x/itop-oauth-client/ru.dict.itop-oauth-client.php b/datamodels/2.x/itop-oauth-client/ru.dict.itop-oauth-client.php
new file mode 100644
index 000000000..60322ded2
--- /dev/null
+++ b/datamodels/2.x/itop-oauth-client/ru.dict.itop-oauth-client.php
@@ -0,0 +1,74 @@
+ 'Create a mailbox...~~',
+ 'Menu:OAuthClient' => 'OAuth Client~~',
+ 'Menu:OAuthClient+' => '~~',
+ 'Menu:GenerateTokens' => 'Generate access tokens...~~',
+ 'Menu:RegenerateTokens' => 'Regenerate access tokens...~~',
+
+ 'itop-oauth-client/Operation:CreateMailBox/Title' => 'Mailbox creation~~',
+
+ 'itop-oauth-client:UsedForSMTP' => 'This OAuth client is used for SMTP~~',
+ 'itop-oauth-client:TestSMTP' => 'Email send test~~',
+ 'itop-oauth-client:MissingOAuthClient' => 'Missing Oauth client for user name %1$s~~',
+ 'itop-oauth-client:Message:OAuthClientCreated' => 'Generate access tokens before using this OAuth client~~',
+ 'itop-oauth-client:Message:TokenCreated' => 'Access token created~~',
+ 'itop-oauth-client:Message:TokenRecreated' => 'Access token regenerated~~',
+]);
+
+//
+// Class: OAuthClient
+//
+
+Dict::Add('RU RU', 'Russian', 'Русский', [
+ 'Class:OAuthClient' => 'Oauth Client~~',
+ 'Class:OAuthClient/Attribute:provider' => 'Provider~~',
+ 'Class:OAuthClient/Attribute:provider+' => '~~',
+ 'Class:OAuthClient/Attribute:name' => 'Login~~',
+ 'Class:OAuthClient/Attribute:name+' => '~~',
+ 'Class:OAuthClient/Attribute:scope' => 'Scope~~',
+ 'Class:OAuthClient/Attribute:scope+' => '~~',
+ 'Class:OAuthClient/Attribute:description' => 'Description~~',
+ 'Class:OAuthClient/Attribute:description+' => '~~',
+ 'Class:OAuthClient/Attribute:client_id' => 'Client id~~',
+ 'Class:OAuthClient/Attribute:client_id+' => '~~',
+ 'Class:OAuthClient/Attribute:client_secret' => 'Client secret~~',
+ 'Class:OAuthClient/Attribute:client_secret+' => '~~',
+ 'Class:OAuthClient/Attribute:refresh_token' => 'Refresh token~~',
+ 'Class:OAuthClient/Attribute:refresh_token+' => '~~',
+ 'Class:OAuthClient/Attribute:refresh_token_expiration' => 'Refresh token expiration~~',
+ 'Class:OAuthClient/Attribute:refresh_token_expiration+' => '~~',
+ 'Class:OAuthClient/Attribute:token' => 'Access token~~',
+ 'Class:OAuthClient/Attribute:token+' => '~~',
+ 'Class:OAuthClient/Attribute:token_expiration' => 'Access token expiration~~',
+ 'Class:OAuthClient/Attribute:token_expiration+' => '~~',
+ 'Class:OAuthClient/Attribute:redirect_url' => 'Redirect url~~',
+ 'Class:OAuthClient/Attribute:redirect_url+' => '~~',
+ 'Class:OAuthClient/Attribute:mailbox_list' => 'Mailbox list~~',
+ 'Class:OAuthClient/Attribute:mailbox_list+' => '~~',
+]);
+
+//
+// Class: OAuthClientAzure
+//
+Dict::Add('RU RU', 'Russian', 'Русский', [
+ 'Class:OAuthClientAzure' => 'OAuth client for Microsoft Azure~~',
+ 'Class:OAuthClientAzure/Name' => '%1$s (%2$s)~~',
+
+]);
+
+//
+// Class: OAuthClientGoogle
+//
+Dict::Add('RU RU', 'Russian', 'Русский', [
+ 'Class:OAuthClientGoogle' => 'OAuth client for Google~~',
+ 'Class:OAuthClientGoogle/Name' => '%1$s (%2$s)~~',
+]);
+
diff --git a/datamodels/2.x/itop-oauth-client/sk.dict.itop-oauth-client.php b/datamodels/2.x/itop-oauth-client/sk.dict.itop-oauth-client.php
new file mode 100644
index 000000000..b0ae8274d
--- /dev/null
+++ b/datamodels/2.x/itop-oauth-client/sk.dict.itop-oauth-client.php
@@ -0,0 +1,74 @@
+ 'Create a mailbox...~~',
+ 'Menu:OAuthClient' => 'OAuth Client~~',
+ 'Menu:OAuthClient+' => '~~',
+ 'Menu:GenerateTokens' => 'Generate access tokens...~~',
+ 'Menu:RegenerateTokens' => 'Regenerate access tokens...~~',
+
+ 'itop-oauth-client/Operation:CreateMailBox/Title' => 'Mailbox creation~~',
+
+ 'itop-oauth-client:UsedForSMTP' => 'This OAuth client is used for SMTP~~',
+ 'itop-oauth-client:TestSMTP' => 'Email send test~~',
+ 'itop-oauth-client:MissingOAuthClient' => 'Missing Oauth client for user name %1$s~~',
+ 'itop-oauth-client:Message:OAuthClientCreated' => 'Generate access tokens before using this OAuth client~~',
+ 'itop-oauth-client:Message:TokenCreated' => 'Access token created~~',
+ 'itop-oauth-client:Message:TokenRecreated' => 'Access token regenerated~~',
+]);
+
+//
+// Class: OAuthClient
+//
+
+Dict::Add('SK SK', 'Slovak', 'Slovenčina', [
+ 'Class:OAuthClient' => 'Oauth Client~~',
+ 'Class:OAuthClient/Attribute:provider' => 'Provider~~',
+ 'Class:OAuthClient/Attribute:provider+' => '~~',
+ 'Class:OAuthClient/Attribute:name' => 'Login~~',
+ 'Class:OAuthClient/Attribute:name+' => '~~',
+ 'Class:OAuthClient/Attribute:scope' => 'Scope~~',
+ 'Class:OAuthClient/Attribute:scope+' => '~~',
+ 'Class:OAuthClient/Attribute:description' => 'Description~~',
+ 'Class:OAuthClient/Attribute:description+' => '~~',
+ 'Class:OAuthClient/Attribute:client_id' => 'Client id~~',
+ 'Class:OAuthClient/Attribute:client_id+' => '~~',
+ 'Class:OAuthClient/Attribute:client_secret' => 'Client secret~~',
+ 'Class:OAuthClient/Attribute:client_secret+' => '~~',
+ 'Class:OAuthClient/Attribute:refresh_token' => 'Refresh token~~',
+ 'Class:OAuthClient/Attribute:refresh_token+' => '~~',
+ 'Class:OAuthClient/Attribute:refresh_token_expiration' => 'Refresh token expiration~~',
+ 'Class:OAuthClient/Attribute:refresh_token_expiration+' => '~~',
+ 'Class:OAuthClient/Attribute:token' => 'Access token~~',
+ 'Class:OAuthClient/Attribute:token+' => '~~',
+ 'Class:OAuthClient/Attribute:token_expiration' => 'Access token expiration~~',
+ 'Class:OAuthClient/Attribute:token_expiration+' => '~~',
+ 'Class:OAuthClient/Attribute:redirect_url' => 'Redirect url~~',
+ 'Class:OAuthClient/Attribute:redirect_url+' => '~~',
+ 'Class:OAuthClient/Attribute:mailbox_list' => 'Mailbox list~~',
+ 'Class:OAuthClient/Attribute:mailbox_list+' => '~~',
+]);
+
+//
+// Class: OAuthClientAzure
+//
+Dict::Add('SK SK', 'Slovak', 'Slovenčina', [
+ 'Class:OAuthClientAzure' => 'OAuth client for Microsoft Azure~~',
+ 'Class:OAuthClientAzure/Name' => '%1$s (%2$s)~~',
+
+]);
+
+//
+// Class: OAuthClientGoogle
+//
+Dict::Add('SK SK', 'Slovak', 'Slovenčina', [
+ 'Class:OAuthClientGoogle' => 'OAuth client for Google~~',
+ 'Class:OAuthClientGoogle/Name' => '%1$s (%2$s)~~',
+]);
+
diff --git a/datamodels/2.x/itop-remote-authent-oauth/src/Controller/AjaxRemoteAuthentOauthController.php b/datamodels/2.x/itop-oauth-client/src/Controller/AjaxOauthClientController.php
similarity index 88%
rename from datamodels/2.x/itop-remote-authent-oauth/src/Controller/AjaxRemoteAuthentOauthController.php
rename to datamodels/2.x/itop-oauth-client/src/Controller/AjaxOauthClientController.php
index 4ab02deec..311c55846 100644
--- a/datamodels/2.x/itop-remote-authent-oauth/src/Controller/AjaxRemoteAuthentOauthController.php
+++ b/datamodels/2.x/itop-oauth-client/src/Controller/AjaxOauthClientController.php
@@ -4,7 +4,7 @@
* @license http://opensource.org/licenses/AGPL-3.0
*/
-namespace Combodo\iTop\RemoteAuthentOAuth\Controller;
+namespace Combodo\iTop\OAuthClient\Controller;
use cmdbAbstractObject;
use Combodo\iTop\Application\TwigBase\Controller\Controller;
@@ -14,7 +14,7 @@ use IssueLog;
use MetaModel;
use utils;
-class AjaxRemoteAuthentOauthController extends Controller
+class AjaxOauthClientController extends Controller
{
const LOG_CHANNEL = 'OAuth';
@@ -31,7 +31,7 @@ class AjaxRemoteAuthentOauthController extends Controller
$sProvider = $oObject->Get('provider');
$sClientId = $oObject->Get('client_id');
$sClientSecret = $oObject->Get('client_secret');
- $sScope = $oObject->Get('scope');
+ $sScope = $oObject->GetScope();
$aAdditional = [];
$sAuthorizationUrl = OAuthClientProviderFactory::getVendorProviderForAccessUrl($sProvider, $sClientId, $sClientSecret, $sScope, $aAdditional);
$aResult['data']['authorization_url'] = $sAuthorizationUrl;
@@ -53,7 +53,7 @@ class AjaxRemoteAuthentOauthController extends Controller
$sProvider = $oObject->Get('provider');
$sClientId = $oObject->Get('client_id');
$sClientSecret = $oObject->Get('client_secret');
- $sScope = $oObject->Get('scope');
+ $sScope = $oObject->GetScope();
$aAdditional = [];
$sRedirectUrl = utils::ReadParam('redirect_url', '', false, 'raw');
@@ -74,7 +74,7 @@ class AjaxRemoteAuthentOauthController extends Controller
$sClass,
$sId,
"$sClass:$sId:TokenCreated",
- $bIsCreation ? Dict::S('itop-remote-authent-oauth:Message:TokenCreated') : Dict::S('itop-remote-authent-oauth:Message:TokenRecreated'),
+ $bIsCreation ? Dict::S('itop-oauth-client:Message:TokenCreated') : Dict::S('itop-oauth-client:Message:TokenRecreated'),
'ok',
1,
true
diff --git a/datamodels/2.x/itop-remote-authent-oauth/src/Controller/RemoteAuthentOauthController.php b/datamodels/2.x/itop-oauth-client/src/Controller/OAuthClientController.php
similarity index 63%
rename from datamodels/2.x/itop-remote-authent-oauth/src/Controller/RemoteAuthentOauthController.php
rename to datamodels/2.x/itop-oauth-client/src/Controller/OAuthClientController.php
index fbeec1b87..26d2b05b6 100644
--- a/datamodels/2.x/itop-remote-authent-oauth/src/Controller/RemoteAuthentOauthController.php
+++ b/datamodels/2.x/itop-oauth-client/src/Controller/OAuthClientController.php
@@ -4,14 +4,14 @@
* @license http://opensource.org/licenses/AGPL-3.0
*/
-namespace Combodo\iTop\RemoteAuthentOAuth\Controller;
+namespace Combodo\iTop\OAuthClient\Controller;
use Combodo\iTop\Application\TwigBase\Controller\Controller;
use IssueLog;
use MetaModel;
use utils;
-class RemoteAuthentOauthController extends Controller
+class OAuthClientController extends Controller
{
const LOG_CHANNEL = 'OAuth';
@@ -24,17 +24,16 @@ class RemoteAuthentOauthController extends Controller
IssueLog::Debug("CreateMailbox for $sClass::$sId", self::LOG_CHANNEL);
- $oRemoteAuthentOAuth = MetaModel::GetObject($sClass, $sId);
- $sLogin = $oRemoteAuthentOAuth->Get('name');
- $sDefaultServer = $oRemoteAuthentOAuth->GetDefaultMailServer();
- $sDefaultPort = $oRemoteAuthentOAuth->GetDefaultMailServerPort();
+ $oOAuthClient = MetaModel::GetObject($sClass, $sId);
+ $sLogin = $oOAuthClient->Get('name');
+ $sDefaultServer = $oOAuthClient->GetDefaultMailServer();
+ $sDefaultPort = $oOAuthClient->GetDefaultMailServerPort();
$aParams['sURL'] = utils::GetAbsoluteUrlAppRoot().'pages/UI.php?operation=new&class=MailInboxOAuth'.
- '&default[protocol]=imap'.
'&default[mailbox]=INBOX'.
'&default[server]='.$sDefaultServer.
'&default[port]='.$sDefaultPort.
- '&default[remote_authent_oauth_id]='.$sId.
+ '&default[oauth_client_id]='.$sId.
'&default[login]='.$sLogin;
$this->DisplayPage($aParams);
diff --git a/datamodels/2.x/itop-oauth-client/src/Model/OAuthClientAzure.php b/datamodels/2.x/itop-oauth-client/src/Model/OAuthClientAzure.php
new file mode 100644
index 000000000..24650bf96
--- /dev/null
+++ b/datamodels/2.x/itop-oauth-client/src/Model/OAuthClientAzure.php
@@ -0,0 +1,147 @@
+ 'cloud',
+ 'key_type' => 'autoincrement',
+ 'name_attcode' => ['name', 'scope'],
+ 'state_attcode' => '',
+ 'reconc_keys' => ['provider', 'name'],
+ 'db_table' => 'priv_oauth_client_azure',
+ 'db_key_field' => 'id',
+ 'icon' => utils::GetAbsoluteUrlModulesRoot().'itop-oauth-client/assets/img/icons8-azure.svg',
+ 'db_finalclass_field' => '',
+ 'uniqueness_rules' => [
+ 'Username for scope' =>
+ [
+ 'attributes' => ['name', 'scope'],
+ 'filter' => null,
+ 'disabled' => false,
+ 'is_blocking' => true,
+ ],
+ 'OAuth Server' =>
+ [
+ 'attributes' => ['provider', 'scope', 'client_id', 'client_secret'],
+ 'filter' => null,
+ 'disabled' => false,
+ 'is_blocking' => true,
+ ],
+ ],
+ ];
+ MetaModel::Init_Params($aParams);
+ MetaModel::Init_InheritAttributes();
+ MetaModel::Init_AddAttribute(new AttributeEnum('scope', [
+ 'allowed_values' => new ValueSetEnum('SMTP,IMAP'),
+ 'display_style' => 'list',
+ 'sql' => 'scope',
+ 'default_value' => 'SMTP',
+ 'is_null_allowed' => false,
+ 'depends_on' => [],
+ 'always_load_in_tables' => true,
+ ]));
+
+ MetaModel::Init_SetZListItems('details', [
+ 0 => 'name',
+ 1 => 'description',
+ 2 => 'provider',
+ 3 => 'scope',
+ 4 => 'redirect_url',
+ 5 => 'client_id',
+ 6 => 'client_secret',
+ 7 => 'mailbox_list',
+ ]);
+ MetaModel::Init_SetZListItems('standard_search', [
+ 0 => 'name',
+ 2 => 'provider',
+ ]);
+ MetaModel::Init_SetZListItems('list', [
+ ]);
+ }
+
+ public function PrefillCreationForm(&$aContextParam)
+ {
+ $this->Set('provider', 'Azure');
+ $this->Set('redirect_url', OAuthClientProviderAbstract::GetRedirectUri());
+
+ parent::PrefillCreationForm($aContextParam);
+ }
+
+ /**
+ * Compute read-only values
+ *
+ * @return void
+ * @throws \ArchivedObjectException
+ * @throws \CoreException
+ * @throws \CoreUnexpectedValue
+ */
+ public function ComputeValues()
+ {
+ parent::ComputeValues();
+ if (empty($this->Get('provider'))) {
+ $this->Set('provider', 'Azure');
+ }
+ if (empty($this->Get('redirect_url'))) {
+ $this->Set('redirect_url', OAuthClientProviderAbstract::GetRedirectUri());
+ }
+ }
+
+ public function GetDefaultMailServer()
+ {
+ return 'outlook.office365.com';
+ }
+
+ public function GetAttributeFlags($sAttCode, &$aReasons = array(), $sTargetState = '')
+ {
+ if ($sAttCode == 'provider' || $sAttCode == 'redirect_url') {
+ return OPT_ATT_READONLY;
+ }
+
+ return parent::GetAttributeFlags($sAttCode, $aReasons, $sTargetState);
+ }
+
+ public function GetInitialStateAttributeFlags($sAttCode, &$aReasons = array())
+ {
+ if ($sAttCode == 'provider' || $sAttCode == 'redirect_url') {
+ return OPT_ATT_READONLY;
+ }
+
+ return parent::GetInitialStateAttributeFlags($sAttCode, $aReasons);
+ }
+
+
+ public function GetScope()
+ {
+ $sScope = $this->Get('scope');
+ if ($sScope == 'IMAP') {
+ return 'https://outlook.office.com/IMAP.AccessAsUser.All offline_access';
+ }
+
+ // default is smtp
+ return 'https://outlook.office.com/SMTP.Send offline_access';
+ }
+
+ public function AfterInsert()
+ {
+ parent::AfterInsert();
+ $sClass = get_class($this);
+ $sId = $this->GetKey();
+ cmdbAbstractObject::SetSessionMessage(
+ $sClass,
+ $sId,
+ "$sClass:$sId:OAuthClientCreated",
+ Dict::S('itop-oauth-client:Message:OAuthClientCreated'),
+ 'info',
+ 100,
+ true
+ );
+ }
+}
\ No newline at end of file
diff --git a/datamodels/2.x/itop-oauth-client/src/Model/OAuthClientGoogle.php b/datamodels/2.x/itop-oauth-client/src/Model/OAuthClientGoogle.php
new file mode 100644
index 000000000..f227a48e0
--- /dev/null
+++ b/datamodels/2.x/itop-oauth-client/src/Model/OAuthClientGoogle.php
@@ -0,0 +1,145 @@
+ 'cloud',
+ 'key_type' => 'autoincrement',
+ 'name_attcode' => ['name', 'scope'],
+ 'state_attcode' => '',
+ 'reconc_keys' => ['provider', 'name'],
+ 'db_table' => 'priv_oauth_client_google',
+ 'db_key_field' => 'id',
+ 'icon' => utils::GetAbsoluteUrlModulesRoot().'itop-oauth-client/assets/img/icons8-google.svg',
+ 'db_finalclass_field' => '',
+ 'uniqueness_rules' => [
+ 'Username for scope' =>
+ [
+ 'attributes' => ['name', 'scope'],
+ 'filter' => null,
+ 'disabled' => false,
+ 'is_blocking' => true,
+ ],
+ 'OAuth Server' =>
+ [
+ 'attributes' => ['provider', 'scope', 'client_id', 'client_secret'],
+ 'filter' => null,
+ 'disabled' => false,
+ 'is_blocking' => true,
+ ],
+ ],
+ );
+ MetaModel::Init_Params($aParams);
+ MetaModel::Init_InheritAttributes();
+ MetaModel::Init_AddAttribute(new AttributeEnum('scope', [
+ 'allowed_values' => new ValueSetEnum('EMail'),
+ 'display_style' => 'list',
+ 'sql' => 'scope',
+ 'default_value' => 'EMail',
+ 'is_null_allowed' => false,
+ 'depends_on' => [],
+ 'always_load_in_tables' => true,
+ ]));
+
+ MetaModel::Init_SetZListItems('details', [
+ 0 => 'name',
+ 1 => 'description',
+ 2 => 'provider',
+ 3 => 'scope',
+ 4 => 'redirect_url',
+ 5 => 'client_id',
+ 6 => 'client_secret',
+ 7 => 'mailbox_list',
+ ]);
+ MetaModel::Init_SetZListItems('standard_search', [
+ 0 => 'name',
+ 2 => 'provider',
+ ]);
+ MetaModel::Init_SetZListItems('list', [
+ ]);
+ }
+
+ public function PrefillCreationForm(&$aContextParam)
+ {
+ $this->Set('provider', 'Google');
+ $this->Set('scope', 'EMail');
+ $this->Set('redirect_url', OAuthClientProviderAbstract::GetRedirectUri());
+
+ parent::PrefillCreationForm($aContextParam);
+ }
+
+ public function GetDefaultMailServer()
+ {
+ return 'imap.gmail.com';
+ }
+
+ public function GetAttributeFlags($sAttCode, &$aReasons = array(), $sTargetState = '')
+ {
+ if ($sAttCode == 'provider' || $sAttCode == 'scope' || $sAttCode == 'redirect_url') {
+ return OPT_ATT_READONLY;
+ }
+
+ return parent::GetAttributeFlags($sAttCode, $aReasons, $sTargetState);
+ }
+
+ public function GetInitialStateAttributeFlags($sAttCode, &$aReasons = array())
+ {
+ if ($sAttCode == 'provider' || $sAttCode == 'scope' || $sAttCode == 'redirect_url') {
+ return OPT_ATT_READONLY;
+ }
+
+ return parent::GetInitialStateAttributeFlags($sAttCode, $aReasons);
+ }
+
+ /**
+ * Compute read-only values
+ *
+ * @return void
+ * @throws \ArchivedObjectException
+ * @throws \CoreException
+ * @throws \CoreUnexpectedValue
+ */
+ public function ComputeValues()
+ {
+ parent::ComputeValues();
+ if (empty($this->Get('provider'))) {
+ $this->Set('provider', 'Google');
+ }
+ if (empty($this->Get('redirect_url'))) {
+ $this->Set('redirect_url', OAuthClientProviderAbstract::GetRedirectUri());
+ }
+ if (empty($this->Get('scope'))) {
+ $this->Set('scope', 'EMail');
+ }
+ }
+
+ public function GetScope()
+ {
+ return 'https://mail.google.com/';
+ }
+
+ public function AfterInsert()
+ {
+ parent::AfterInsert();
+ $sClass = get_class($this);
+ $sId = $this->GetKey();
+ cmdbAbstractObject::SetSessionMessage(
+ $sClass,
+ $sId,
+ "$sClass:$sId:OAuthClientCreated",
+ Dict::S('itop-oauth-client:Message:OAuthClientCreated'),
+ 'info',
+ 100,
+ true
+ );
+ }
+}
\ No newline at end of file
diff --git a/datamodels/2.x/itop-remote-authent-oauth/src/Service/ApplicationObjectExtension.php b/datamodels/2.x/itop-oauth-client/src/Service/ApplicationObjectExtension.php
similarity index 81%
rename from datamodels/2.x/itop-remote-authent-oauth/src/Service/ApplicationObjectExtension.php
rename to datamodels/2.x/itop-oauth-client/src/Service/ApplicationObjectExtension.php
index 1d2aeb448..b9b074702 100644
--- a/datamodels/2.x/itop-remote-authent-oauth/src/Service/ApplicationObjectExtension.php
+++ b/datamodels/2.x/itop-oauth-client/src/Service/ApplicationObjectExtension.php
@@ -4,18 +4,18 @@
* @license http://opensource.org/licenses/AGPL-3.0
*/
-namespace Combodo\iTop\RemoteAuthentOAuth\Service;
+namespace Combodo\iTop\OAuthClient\Service;
use AbstractApplicationObjectExtension;
use Exception;
-use RemoteAuthentOAuth;
+use OAuthClient;
class ApplicationObjectExtension extends AbstractApplicationObjectExtension
{
public function OnDBInsert($oObject, $oChange = null)
{
- if ($oObject instanceof RemoteAuthentOAuth) {
+ if ($oObject instanceof OAuthClient) {
try {
// Ask for tokens the first time
diff --git a/datamodels/2.x/itop-remote-authent-oauth/src/Service/PopupMenuExtension.php b/datamodels/2.x/itop-oauth-client/src/Service/PopupMenuExtension.php
similarity index 70%
rename from datamodels/2.x/itop-remote-authent-oauth/src/Service/PopupMenuExtension.php
rename to datamodels/2.x/itop-oauth-client/src/Service/PopupMenuExtension.php
index 1e986a069..28fe84989 100644
--- a/datamodels/2.x/itop-remote-authent-oauth/src/Service/PopupMenuExtension.php
+++ b/datamodels/2.x/itop-oauth-client/src/Service/PopupMenuExtension.php
@@ -4,21 +4,21 @@
* @license http://opensource.org/licenses/AGPL-3.0
*/
-namespace Combodo\iTop\RemoteAuthentOAuth\Service;
+namespace Combodo\iTop\OAuthClient\Service;
use ApplicationContext;
use Combodo\iTop\Core\Authentication\Client\OAuth\OAuthClientProviderAbstract;
use Dict;
use iPopupMenuExtension;
use JSPopupMenuItem;
-use RemoteAuthentOAuth;
+use OAuthClient;
use SeparatorPopupMenuItem;
use URLPopupMenuItem;
use utils;
class PopupMenuExtension implements \iPopupMenuExtension
{
- const MODULE_CODE = 'itop-remote-authent-oauth';
+ const MODULE_CODE = 'itop-oauth-client';
/**
* @inheritDoc
@@ -30,7 +30,7 @@ class PopupMenuExtension implements \iPopupMenuExtension
switch ($iMenuId) {
case iPopupMenuExtension::MENU_OBJDETAILS_ACTIONS:
$oObj = $param;
- if ($oObj instanceof RemoteAuthentOAuth) {
+ if ($oObj instanceof OAuthClient) {
$bHasToken = !empty($oObj->Get('token'));
$aResult[] = new SeparatorPopupMenuItem();
@@ -51,17 +51,20 @@ class PopupMenuExtension implements \iPopupMenuExtension
);
if ($bHasToken) {
- $aParams = $oAppContext->GetAsHash();
- $sMenu = 'Menu:CreateMailbox';
- $sObjClass = get_class($oObj);
- $aParams['class'] = $sObjClass;
- $aParams['id'] = $oObj->GetKey();
- $aParams['operation'] = 'CreateMailBox';
- $aResult[] = new URLPopupMenuItem(
- $sMenu.' from '.$sObjClass,
- Dict::S($sMenu),
- utils::GetAbsoluteUrlModulePage(static::MODULE_CODE, 'index.php', $aParams)
- );
+ $sScope = $oObj->Get('scope');
+ if ($sScope == 'IMAP' || $sScope == 'EMail') {
+ $aParams = $oAppContext->GetAsHash();
+ $sMenu = 'Menu:CreateMailbox';
+ $sObjClass = get_class($oObj);
+ $aParams['class'] = $sObjClass;
+ $aParams['id'] = $oObj->GetKey();
+ $aParams['operation'] = 'CreateMailBox';
+ $aResult[] = new URLPopupMenuItem(
+ $sMenu.' from '.$sObjClass,
+ Dict::S($sMenu),
+ utils::GetAbsoluteUrlModulePage(static::MODULE_CODE, 'index.php', $aParams)
+ );
+ }
}
}
break;
diff --git a/datamodels/2.x/itop-remote-authent-oauth/templates/legacy/CreateMailbox.html.twig b/datamodels/2.x/itop-oauth-client/templates/legacy/CreateMailbox.html.twig
similarity index 100%
rename from datamodels/2.x/itop-remote-authent-oauth/templates/legacy/CreateMailbox.html.twig
rename to datamodels/2.x/itop-oauth-client/templates/legacy/CreateMailbox.html.twig
diff --git a/datamodels/2.x/itop-remote-authent-oauth/templates/legacy/CreateMailbox.ready.js.twig b/datamodels/2.x/itop-oauth-client/templates/legacy/CreateMailbox.ready.js.twig
similarity index 100%
rename from datamodels/2.x/itop-remote-authent-oauth/templates/legacy/CreateMailbox.ready.js.twig
rename to datamodels/2.x/itop-oauth-client/templates/legacy/CreateMailbox.ready.js.twig
diff --git a/datamodels/2.x/itop-oauth-client/tr.dict.itop-oauth-client.php b/datamodels/2.x/itop-oauth-client/tr.dict.itop-oauth-client.php
new file mode 100644
index 000000000..37494374f
--- /dev/null
+++ b/datamodels/2.x/itop-oauth-client/tr.dict.itop-oauth-client.php
@@ -0,0 +1,74 @@
+ 'Create a mailbox...~~',
+ 'Menu:OAuthClient' => 'OAuth Client~~',
+ 'Menu:OAuthClient+' => '~~',
+ 'Menu:GenerateTokens' => 'Generate access tokens...~~',
+ 'Menu:RegenerateTokens' => 'Regenerate access tokens...~~',
+
+ 'itop-oauth-client/Operation:CreateMailBox/Title' => 'Mailbox creation~~',
+
+ 'itop-oauth-client:UsedForSMTP' => 'This OAuth client is used for SMTP~~',
+ 'itop-oauth-client:TestSMTP' => 'Email send test~~',
+ 'itop-oauth-client:MissingOAuthClient' => 'Missing Oauth client for user name %1$s~~',
+ 'itop-oauth-client:Message:OAuthClientCreated' => 'Generate access tokens before using this OAuth client~~',
+ 'itop-oauth-client:Message:TokenCreated' => 'Access token created~~',
+ 'itop-oauth-client:Message:TokenRecreated' => 'Access token regenerated~~',
+]);
+
+//
+// Class: OAuthClient
+//
+
+Dict::Add('TR TR', 'Turkish', 'Türkçe', [
+ 'Class:OAuthClient' => 'Oauth Client~~',
+ 'Class:OAuthClient/Attribute:provider' => 'Provider~~',
+ 'Class:OAuthClient/Attribute:provider+' => '~~',
+ 'Class:OAuthClient/Attribute:name' => 'Login~~',
+ 'Class:OAuthClient/Attribute:name+' => '~~',
+ 'Class:OAuthClient/Attribute:scope' => 'Scope~~',
+ 'Class:OAuthClient/Attribute:scope+' => '~~',
+ 'Class:OAuthClient/Attribute:description' => 'Description~~',
+ 'Class:OAuthClient/Attribute:description+' => '~~',
+ 'Class:OAuthClient/Attribute:client_id' => 'Client id~~',
+ 'Class:OAuthClient/Attribute:client_id+' => '~~',
+ 'Class:OAuthClient/Attribute:client_secret' => 'Client secret~~',
+ 'Class:OAuthClient/Attribute:client_secret+' => '~~',
+ 'Class:OAuthClient/Attribute:refresh_token' => 'Refresh token~~',
+ 'Class:OAuthClient/Attribute:refresh_token+' => '~~',
+ 'Class:OAuthClient/Attribute:refresh_token_expiration' => 'Refresh token expiration~~',
+ 'Class:OAuthClient/Attribute:refresh_token_expiration+' => '~~',
+ 'Class:OAuthClient/Attribute:token' => 'Access token~~',
+ 'Class:OAuthClient/Attribute:token+' => '~~',
+ 'Class:OAuthClient/Attribute:token_expiration' => 'Access token expiration~~',
+ 'Class:OAuthClient/Attribute:token_expiration+' => '~~',
+ 'Class:OAuthClient/Attribute:redirect_url' => 'Redirect url~~',
+ 'Class:OAuthClient/Attribute:redirect_url+' => '~~',
+ 'Class:OAuthClient/Attribute:mailbox_list' => 'Mailbox list~~',
+ 'Class:OAuthClient/Attribute:mailbox_list+' => '~~',
+]);
+
+//
+// Class: OAuthClientAzure
+//
+Dict::Add('TR TR', 'Turkish', 'Türkçe', [
+ 'Class:OAuthClientAzure' => 'OAuth client for Microsoft Azure~~',
+ 'Class:OAuthClientAzure/Name' => '%1$s (%2$s)~~',
+
+]);
+
+//
+// Class: OAuthClientGoogle
+//
+Dict::Add('TR TR', 'Turkish', 'Türkçe', [
+ 'Class:OAuthClientGoogle' => 'OAuth client for Google~~',
+ 'Class:OAuthClientGoogle/Name' => '%1$s (%2$s)~~',
+]);
+
diff --git a/datamodels/2.x/itop-remote-authent-oauth/vendor/autoload.php b/datamodels/2.x/itop-oauth-client/vendor/autoload.php
similarity index 100%
rename from datamodels/2.x/itop-remote-authent-oauth/vendor/autoload.php
rename to datamodels/2.x/itop-oauth-client/vendor/autoload.php
diff --git a/datamodels/2.x/itop-remote-authent-oauth/vendor/composer/ClassLoader.php b/datamodels/2.x/itop-oauth-client/vendor/composer/ClassLoader.php
similarity index 100%
rename from datamodels/2.x/itop-remote-authent-oauth/vendor/composer/ClassLoader.php
rename to datamodels/2.x/itop-oauth-client/vendor/composer/ClassLoader.php
diff --git a/datamodels/2.x/itop-remote-authent-oauth/vendor/composer/LICENSE b/datamodels/2.x/itop-oauth-client/vendor/composer/LICENSE
similarity index 100%
rename from datamodels/2.x/itop-remote-authent-oauth/vendor/composer/LICENSE
rename to datamodels/2.x/itop-oauth-client/vendor/composer/LICENSE
diff --git a/datamodels/2.x/itop-oauth-client/vendor/composer/autoload_classmap.php b/datamodels/2.x/itop-oauth-client/vendor/composer/autoload_classmap.php
new file mode 100644
index 000000000..b0e88deda
--- /dev/null
+++ b/datamodels/2.x/itop-oauth-client/vendor/composer/autoload_classmap.php
@@ -0,0 +1,14 @@
+ $baseDir . '/src/Controller/AjaxOauthClientController.php',
+ 'Combodo\\iTop\\OAuthClient\\Controller\\OAuthClientController' => $baseDir . '/src/Controller/OAuthClientController.php',
+ 'Combodo\\iTop\\OAuthClient\\Service\\ApplicationObjectExtension' => $baseDir . '/src/Service/ApplicationObjectExtension.php',
+ 'Combodo\\iTop\\OAuthClient\\Service\\PopupMenuExtension' => $baseDir . '/src/Service/PopupMenuExtension.php',
+ 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
+);
diff --git a/datamodels/2.x/itop-remote-authent-oauth/vendor/composer/autoload_namespaces.php b/datamodels/2.x/itop-oauth-client/vendor/composer/autoload_namespaces.php
similarity index 100%
rename from datamodels/2.x/itop-remote-authent-oauth/vendor/composer/autoload_namespaces.php
rename to datamodels/2.x/itop-oauth-client/vendor/composer/autoload_namespaces.php
diff --git a/datamodels/2.x/itop-remote-authent-oauth/vendor/composer/autoload_psr4.php b/datamodels/2.x/itop-oauth-client/vendor/composer/autoload_psr4.php
similarity index 66%
rename from datamodels/2.x/itop-remote-authent-oauth/vendor/composer/autoload_psr4.php
rename to datamodels/2.x/itop-oauth-client/vendor/composer/autoload_psr4.php
index 4d75d6691..6662c07b2 100644
--- a/datamodels/2.x/itop-remote-authent-oauth/vendor/composer/autoload_psr4.php
+++ b/datamodels/2.x/itop-oauth-client/vendor/composer/autoload_psr4.php
@@ -6,5 +6,5 @@ $vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
- 'Combodo\\iTop\\RemoteAuthentOAuth\\' => array($baseDir . '/src'),
+ 'Combodo\\iTop\\OAuthClient\\' => array($baseDir . '/src'),
);
diff --git a/datamodels/2.x/itop-remote-authent-oauth/vendor/composer/autoload_real.php b/datamodels/2.x/itop-oauth-client/vendor/composer/autoload_real.php
similarity index 100%
rename from datamodels/2.x/itop-remote-authent-oauth/vendor/composer/autoload_real.php
rename to datamodels/2.x/itop-oauth-client/vendor/composer/autoload_real.php
diff --git a/datamodels/2.x/itop-remote-authent-oauth/vendor/composer/autoload_static.php b/datamodels/2.x/itop-oauth-client/vendor/composer/autoload_static.php
similarity index 53%
rename from datamodels/2.x/itop-remote-authent-oauth/vendor/composer/autoload_static.php
rename to datamodels/2.x/itop-oauth-client/vendor/composer/autoload_static.php
index ef1787691..7143a8612 100644
--- a/datamodels/2.x/itop-remote-authent-oauth/vendor/composer/autoload_static.php
+++ b/datamodels/2.x/itop-oauth-client/vendor/composer/autoload_static.php
@@ -9,23 +9,22 @@ class ComposerStaticInitd52424b43ff18219f2ec935428aff074
public static $prefixLengthsPsr4 = array (
'C' =>
array (
- 'Combodo\\iTop\\RemoteAuthentOAuth\\' => 32,
+ 'Combodo\\iTop\\OAuthClient\\' => 25,
),
);
public static $prefixDirsPsr4 = array (
- 'Combodo\\iTop\\RemoteAuthentOAuth\\' =>
+ 'Combodo\\iTop\\OAuthClient\\' =>
array (
0 => __DIR__ . '/../..' . '/src',
),
);
public static $classMap = array (
- 'Combodo\\iTop\\RemoteAuthentOAuth\\Controller\\AjaxRemoteAuthentOauthController' => __DIR__ . '/../..' . '/src/Controller/AjaxRemoteAuthentOauthController.php',
- 'Combodo\\iTop\\RemoteAuthentOAuth\\Controller\\RemoteAuthentOauthController' => __DIR__ . '/../..' . '/src/Controller/RemoteAuthentOauthController.php',
- 'Combodo\\iTop\\RemoteAuthentOAuth\\Service\\ApplicationObjectExtension' => __DIR__ . '/../..' . '/src/Service/ApplicationObjectExtension.php',
- 'Combodo\\iTop\\RemoteAuthentOAuth\\Service\\PopupMenuExtension' => __DIR__ . '/../..' . '/src/Service/PopupMenuExtension.php',
- 'Combodo\\iTop\\RemoteAuthentOAuth\\Service\\RemoteAuthentOAuthService' => __DIR__ . '/../..' . '/src/Service/RemoteAuthentOAuthService.php',
+ 'Combodo\\iTop\\OAuthClient\\Controller\\AjaxOauthClientController' => __DIR__ . '/../..' . '/src/Controller/AjaxOauthClientController.php',
+ 'Combodo\\iTop\\OAuthClient\\Controller\\OAuthClientController' => __DIR__ . '/../..' . '/src/Controller/OAuthClientController.php',
+ 'Combodo\\iTop\\OAuthClient\\Service\\ApplicationObjectExtension' => __DIR__ . '/../..' . '/src/Service/ApplicationObjectExtension.php',
+ 'Combodo\\iTop\\OAuthClient\\Service\\PopupMenuExtension' => __DIR__ . '/../..' . '/src/Service/PopupMenuExtension.php',
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
);
diff --git a/datamodels/2.x/itop-oauth-client/zh_cn.dict.itop-oauth-client.php b/datamodels/2.x/itop-oauth-client/zh_cn.dict.itop-oauth-client.php
new file mode 100644
index 000000000..c820abfb4
--- /dev/null
+++ b/datamodels/2.x/itop-oauth-client/zh_cn.dict.itop-oauth-client.php
@@ -0,0 +1,74 @@
+ 'Create a mailbox...~~',
+ 'Menu:OAuthClient' => 'OAuth Client~~',
+ 'Menu:OAuthClient+' => '~~',
+ 'Menu:GenerateTokens' => 'Generate access tokens...~~',
+ 'Menu:RegenerateTokens' => 'Regenerate access tokens...~~',
+
+ 'itop-oauth-client/Operation:CreateMailBox/Title' => 'Mailbox creation~~',
+
+ 'itop-oauth-client:UsedForSMTP' => 'This OAuth client is used for SMTP~~',
+ 'itop-oauth-client:TestSMTP' => 'Email send test~~',
+ 'itop-oauth-client:MissingOAuthClient' => 'Missing Oauth client for user name %1$s~~',
+ 'itop-oauth-client:Message:OAuthClientCreated' => 'Generate access tokens before using this OAuth client~~',
+ 'itop-oauth-client:Message:TokenCreated' => 'Access token created~~',
+ 'itop-oauth-client:Message:TokenRecreated' => 'Access token regenerated~~',
+]);
+
+//
+// Class: OAuthClient
+//
+
+Dict::Add('ZH CN', 'Chinese', '简体中文', [
+ 'Class:OAuthClient' => 'Oauth Client~~',
+ 'Class:OAuthClient/Attribute:provider' => 'Provider~~',
+ 'Class:OAuthClient/Attribute:provider+' => '~~',
+ 'Class:OAuthClient/Attribute:name' => 'Login~~',
+ 'Class:OAuthClient/Attribute:name+' => '~~',
+ 'Class:OAuthClient/Attribute:scope' => 'Scope~~',
+ 'Class:OAuthClient/Attribute:scope+' => '~~',
+ 'Class:OAuthClient/Attribute:description' => 'Description~~',
+ 'Class:OAuthClient/Attribute:description+' => '~~',
+ 'Class:OAuthClient/Attribute:client_id' => 'Client id~~',
+ 'Class:OAuthClient/Attribute:client_id+' => '~~',
+ 'Class:OAuthClient/Attribute:client_secret' => 'Client secret~~',
+ 'Class:OAuthClient/Attribute:client_secret+' => '~~',
+ 'Class:OAuthClient/Attribute:refresh_token' => 'Refresh token~~',
+ 'Class:OAuthClient/Attribute:refresh_token+' => '~~',
+ 'Class:OAuthClient/Attribute:refresh_token_expiration' => 'Refresh token expiration~~',
+ 'Class:OAuthClient/Attribute:refresh_token_expiration+' => '~~',
+ 'Class:OAuthClient/Attribute:token' => 'Access token~~',
+ 'Class:OAuthClient/Attribute:token+' => '~~',
+ 'Class:OAuthClient/Attribute:token_expiration' => 'Access token expiration~~',
+ 'Class:OAuthClient/Attribute:token_expiration+' => '~~',
+ 'Class:OAuthClient/Attribute:redirect_url' => 'Redirect url~~',
+ 'Class:OAuthClient/Attribute:redirect_url+' => '~~',
+ 'Class:OAuthClient/Attribute:mailbox_list' => 'Mailbox list~~',
+ 'Class:OAuthClient/Attribute:mailbox_list+' => '~~',
+]);
+
+//
+// Class: OAuthClientAzure
+//
+Dict::Add('ZH CN', 'Chinese', '简体中文', [
+ 'Class:OAuthClientAzure' => 'OAuth client for Microsoft Azure~~',
+ 'Class:OAuthClientAzure/Name' => '%1$s (%2$s)~~',
+
+]);
+
+//
+// Class: OAuthClientGoogle
+//
+Dict::Add('ZH CN', 'Chinese', '简体中文', [
+ 'Class:OAuthClientGoogle' => 'OAuth client for Google~~',
+ 'Class:OAuthClientGoogle/Name' => '%1$s (%2$s)~~',
+]);
+
diff --git a/datamodels/2.x/itop-remote-authent-oauth/README.md b/datamodels/2.x/itop-remote-authent-oauth/README.md
deleted file mode 100644
index 200c96ef9..000000000
--- a/datamodels/2.x/itop-remote-authent-oauth/README.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# Extension Remote authentication for OAuth 2.0
-
diff --git a/datamodels/2.x/itop-remote-authent-oauth/cs.dict.itop-remote-authent-oauth.php b/datamodels/2.x/itop-remote-authent-oauth/cs.dict.itop-remote-authent-oauth.php
deleted file mode 100644
index fd21adf6b..000000000
--- a/datamodels/2.x/itop-remote-authent-oauth/cs.dict.itop-remote-authent-oauth.php
+++ /dev/null
@@ -1,59 +0,0 @@
- 'Create a mailbox...~~',
- 'Menu:RemoteOAuth' => 'OAuth Client~~',
- 'Menu:GenerateTokens' => 'Generate access tokens...~~',
- 'Menu:RegenerateTokens' => 'Regenerate access tokens...~~',
-
- 'itop-remote-authent-oauth/Operation:CreateMailBox/Title' => 'Mailbox creation~~',
-
- 'itop-remote-authent-oauth:UsedForSMTP' => 'This OAuth client is used for SMTP~~',
- 'itop-remote-authent-oauth:TestSMTP' => 'Email send test~~',
- 'itop-remote-authent-oauth:MissingRemoteAuthentOAuth' => 'Missing Oauth client for user name %1$s~~',
- 'itop-remote-authent-oauth:Message:TokenCreated' => 'Access token created~~',
- 'itop-remote-authent-oauth:Message:TokenRecreated' => 'Access token regenerated~~',
-
- 'Class:RemoteAuthentOAuthGoogle' => 'OAuth client for Google~~',
- 'Class:RemoteAuthentOAuthAzure' => 'OAuth client for Microsoft Azure~~',
-]);
-
-//
-// Class: RemoteAuthentOAuth
-//
-
-Dict::Add('CS CZ', 'Czech', 'Čeština', [
- 'Class:RemoteAuthentOAuth' => 'Oauth Client~~',
- 'Class:RemoteAuthentOAuth/Name' => '%1$s-%%2$s~~',
- 'Class:RemoteAuthentOAuth/Attribute:provider' => 'Provider~~',
- 'Class:RemoteAuthentOAuth/Attribute:provider+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:name' => 'Login~~',
- 'Class:RemoteAuthentOAuth/Attribute:name+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:scope' => 'Scope~~',
- 'Class:RemoteAuthentOAuth/Attribute:scope+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:description' => 'Description~~',
- 'Class:RemoteAuthentOAuth/Attribute:description+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_id' => 'Client id~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_id+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_secret' => 'Client secret~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_secret+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token' => 'Refresh token~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token_expiration' => 'Refresh token expiration~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token_expiration+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:token' => 'Access token~~',
- 'Class:RemoteAuthentOAuth/Attribute:token+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:token_expiration' => 'Access token expiration~~',
- 'Class:RemoteAuthentOAuth/Attribute:token_expiration+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:redirect_url' => 'Redirect url~~',
- 'Class:RemoteAuthentOAuth/Attribute:redirect_url+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:mailbox_list' => 'Mailbox list~~',
- 'Class:RemoteAuthentOAuth/Attribute:mailbox_list+' => '~~',
-]);
-
diff --git a/datamodels/2.x/itop-remote-authent-oauth/da.dict.itop-remote-authent-oauth.php b/datamodels/2.x/itop-remote-authent-oauth/da.dict.itop-remote-authent-oauth.php
deleted file mode 100644
index 908197f45..000000000
--- a/datamodels/2.x/itop-remote-authent-oauth/da.dict.itop-remote-authent-oauth.php
+++ /dev/null
@@ -1,59 +0,0 @@
- 'Create a mailbox...~~',
- 'Menu:RemoteOAuth' => 'OAuth Client~~',
- 'Menu:GenerateTokens' => 'Generate access tokens...~~',
- 'Menu:RegenerateTokens' => 'Regenerate access tokens...~~',
-
- 'itop-remote-authent-oauth/Operation:CreateMailBox/Title' => 'Mailbox creation~~',
-
- 'itop-remote-authent-oauth:UsedForSMTP' => 'This OAuth client is used for SMTP~~',
- 'itop-remote-authent-oauth:TestSMTP' => 'Email send test~~',
- 'itop-remote-authent-oauth:MissingRemoteAuthentOAuth' => 'Missing Oauth client for user name %1$s~~',
- 'itop-remote-authent-oauth:Message:TokenCreated' => 'Access token created~~',
- 'itop-remote-authent-oauth:Message:TokenRecreated' => 'Access token regenerated~~',
-
- 'Class:RemoteAuthentOAuthGoogle' => 'OAuth client for Google~~',
- 'Class:RemoteAuthentOAuthAzure' => 'OAuth client for Microsoft Azure~~',
-]);
-
-//
-// Class: RemoteAuthentOAuth
-//
-
-Dict::Add('DA DA', 'Danish', 'Dansk', [
- 'Class:RemoteAuthentOAuth' => 'Oauth Client~~',
- 'Class:RemoteAuthentOAuth/Name' => '%1$s-%%2$s~~',
- 'Class:RemoteAuthentOAuth/Attribute:provider' => 'Provider~~',
- 'Class:RemoteAuthentOAuth/Attribute:provider+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:name' => 'Login~~',
- 'Class:RemoteAuthentOAuth/Attribute:name+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:scope' => 'Scope~~',
- 'Class:RemoteAuthentOAuth/Attribute:scope+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:description' => 'Description~~',
- 'Class:RemoteAuthentOAuth/Attribute:description+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_id' => 'Client id~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_id+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_secret' => 'Client secret~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_secret+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token' => 'Refresh token~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token_expiration' => 'Refresh token expiration~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token_expiration+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:token' => 'Access token~~',
- 'Class:RemoteAuthentOAuth/Attribute:token+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:token_expiration' => 'Access token expiration~~',
- 'Class:RemoteAuthentOAuth/Attribute:token_expiration+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:redirect_url' => 'Redirect url~~',
- 'Class:RemoteAuthentOAuth/Attribute:redirect_url+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:mailbox_list' => 'Mailbox list~~',
- 'Class:RemoteAuthentOAuth/Attribute:mailbox_list+' => '~~',
-]);
-
diff --git a/datamodels/2.x/itop-remote-authent-oauth/de.dict.itop-remote-authent-oauth.php b/datamodels/2.x/itop-remote-authent-oauth/de.dict.itop-remote-authent-oauth.php
deleted file mode 100644
index 9bc134629..000000000
--- a/datamodels/2.x/itop-remote-authent-oauth/de.dict.itop-remote-authent-oauth.php
+++ /dev/null
@@ -1,59 +0,0 @@
- 'Create a mailbox...~~',
- 'Menu:RemoteOAuth' => 'OAuth Client~~',
- 'Menu:GenerateTokens' => 'Generate access tokens...~~',
- 'Menu:RegenerateTokens' => 'Regenerate access tokens...~~',
-
- 'itop-remote-authent-oauth/Operation:CreateMailBox/Title' => 'Mailbox creation~~',
-
- 'itop-remote-authent-oauth:UsedForSMTP' => 'This OAuth client is used for SMTP~~',
- 'itop-remote-authent-oauth:TestSMTP' => 'Email send test~~',
- 'itop-remote-authent-oauth:MissingRemoteAuthentOAuth' => 'Missing Oauth client for user name %1$s~~',
- 'itop-remote-authent-oauth:Message:TokenCreated' => 'Access token created~~',
- 'itop-remote-authent-oauth:Message:TokenRecreated' => 'Access token regenerated~~',
-
- 'Class:RemoteAuthentOAuthGoogle' => 'OAuth client for Google~~',
- 'Class:RemoteAuthentOAuthAzure' => 'OAuth client for Microsoft Azure~~',
-]);
-
-//
-// Class: RemoteAuthentOAuth
-//
-
-Dict::Add('DE DE', 'German', 'Deutsch', [
- 'Class:RemoteAuthentOAuth' => 'Oauth Client~~',
- 'Class:RemoteAuthentOAuth/Name' => '%1$s-%%2$s~~',
- 'Class:RemoteAuthentOAuth/Attribute:provider' => 'Provider~~',
- 'Class:RemoteAuthentOAuth/Attribute:provider+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:name' => 'Login~~',
- 'Class:RemoteAuthentOAuth/Attribute:name+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:scope' => 'Scope~~',
- 'Class:RemoteAuthentOAuth/Attribute:scope+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:description' => 'Description~~',
- 'Class:RemoteAuthentOAuth/Attribute:description+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_id' => 'Client id~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_id+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_secret' => 'Client secret~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_secret+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token' => 'Refresh token~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token_expiration' => 'Refresh token expiration~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token_expiration+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:token' => 'Access token~~',
- 'Class:RemoteAuthentOAuth/Attribute:token+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:token_expiration' => 'Access token expiration~~',
- 'Class:RemoteAuthentOAuth/Attribute:token_expiration+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:redirect_url' => 'Redirect url~~',
- 'Class:RemoteAuthentOAuth/Attribute:redirect_url+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:mailbox_list' => 'Mailbox list~~',
- 'Class:RemoteAuthentOAuth/Attribute:mailbox_list+' => '~~',
-]);
-
diff --git a/datamodels/2.x/itop-remote-authent-oauth/en.dict.itop-remote-authent-oauth.php b/datamodels/2.x/itop-remote-authent-oauth/en.dict.itop-remote-authent-oauth.php
deleted file mode 100644
index 30c279dc6..000000000
--- a/datamodels/2.x/itop-remote-authent-oauth/en.dict.itop-remote-authent-oauth.php
+++ /dev/null
@@ -1,59 +0,0 @@
- 'Create a mailbox...',
- 'Menu:RemoteOAuth' => 'OAuth Client',
- 'Menu:GenerateTokens' => 'Generate access tokens...',
- 'Menu:RegenerateTokens' => 'Regenerate access tokens...',
-
- 'itop-remote-authent-oauth/Operation:CreateMailBox/Title' => 'Mailbox creation',
-
- 'itop-remote-authent-oauth:UsedForSMTP' => 'This OAuth client is used for SMTP',
- 'itop-remote-authent-oauth:TestSMTP' => 'Email send test',
- 'itop-remote-authent-oauth:MissingRemoteAuthentOAuth' => 'Missing Oauth client for user name %1$s',
- 'itop-remote-authent-oauth:Message:TokenCreated' => 'Access token created',
- 'itop-remote-authent-oauth:Message:TokenRecreated' => 'Access token regenerated',
-
- 'Class:RemoteAuthentOAuthGoogle' => 'OAuth client for Google',
- 'Class:RemoteAuthentOAuthAzure' => 'OAuth client for Microsoft Azure',
-]);
-
-//
-// Class: RemoteAuthentOAuth
-//
-
-Dict::Add('EN US', 'English', 'English', [
- 'Class:RemoteAuthentOAuth' => 'Oauth Client',
- 'Class:RemoteAuthentOAuth/Name' => '%1$s-%%2$s',
- 'Class:RemoteAuthentOAuth/Attribute:provider' => 'Provider',
- 'Class:RemoteAuthentOAuth/Attribute:provider+' => '',
- 'Class:RemoteAuthentOAuth/Attribute:name' => 'Login',
- 'Class:RemoteAuthentOAuth/Attribute:name+' => '',
- 'Class:RemoteAuthentOAuth/Attribute:scope' => 'Scope',
- 'Class:RemoteAuthentOAuth/Attribute:scope+' => '',
- 'Class:RemoteAuthentOAuth/Attribute:description' => 'Description',
- 'Class:RemoteAuthentOAuth/Attribute:description+' => '',
- 'Class:RemoteAuthentOAuth/Attribute:client_id' => 'Client id',
- 'Class:RemoteAuthentOAuth/Attribute:client_id+' => '',
- 'Class:RemoteAuthentOAuth/Attribute:client_secret' => 'Client secret',
- 'Class:RemoteAuthentOAuth/Attribute:client_secret+' => '',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token' => 'Refresh token',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token+' => '',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token_expiration' => 'Refresh token expiration',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token_expiration+' => '',
- 'Class:RemoteAuthentOAuth/Attribute:token' => 'Access token',
- 'Class:RemoteAuthentOAuth/Attribute:token+' => '',
- 'Class:RemoteAuthentOAuth/Attribute:token_expiration' => 'Access token expiration',
- 'Class:RemoteAuthentOAuth/Attribute:token_expiration+' => '',
- 'Class:RemoteAuthentOAuth/Attribute:redirect_url' => 'Redirect url',
- 'Class:RemoteAuthentOAuth/Attribute:redirect_url+' => '',
- 'Class:RemoteAuthentOAuth/Attribute:mailbox_list' => 'Mailbox list',
- 'Class:RemoteAuthentOAuth/Attribute:mailbox_list+' => '',
-]);
-
diff --git a/datamodels/2.x/itop-remote-authent-oauth/es_cr.dict.itop-remote-authent-oauth.php b/datamodels/2.x/itop-remote-authent-oauth/es_cr.dict.itop-remote-authent-oauth.php
deleted file mode 100644
index 327668d44..000000000
--- a/datamodels/2.x/itop-remote-authent-oauth/es_cr.dict.itop-remote-authent-oauth.php
+++ /dev/null
@@ -1,59 +0,0 @@
- 'Create a mailbox...~~',
- 'Menu:RemoteOAuth' => 'OAuth Client~~',
- 'Menu:GenerateTokens' => 'Generate access tokens...~~',
- 'Menu:RegenerateTokens' => 'Regenerate access tokens...~~',
-
- 'itop-remote-authent-oauth/Operation:CreateMailBox/Title' => 'Mailbox creation~~',
-
- 'itop-remote-authent-oauth:UsedForSMTP' => 'This OAuth client is used for SMTP~~',
- 'itop-remote-authent-oauth:TestSMTP' => 'Email send test~~',
- 'itop-remote-authent-oauth:MissingRemoteAuthentOAuth' => 'Missing Oauth client for user name %1$s~~',
- 'itop-remote-authent-oauth:Message:TokenCreated' => 'Access token created~~',
- 'itop-remote-authent-oauth:Message:TokenRecreated' => 'Access token regenerated~~',
-
- 'Class:RemoteAuthentOAuthGoogle' => 'OAuth client for Google~~',
- 'Class:RemoteAuthentOAuthAzure' => 'OAuth client for Microsoft Azure~~',
-]);
-
-//
-// Class: RemoteAuthentOAuth
-//
-
-Dict::Add('ES CR', 'Spanish', 'Español, Castellaño', [
- 'Class:RemoteAuthentOAuth' => 'Oauth Client~~',
- 'Class:RemoteAuthentOAuth/Name' => '%1$s-%%2$s~~',
- 'Class:RemoteAuthentOAuth/Attribute:provider' => 'Provider~~',
- 'Class:RemoteAuthentOAuth/Attribute:provider+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:name' => 'Login~~',
- 'Class:RemoteAuthentOAuth/Attribute:name+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:scope' => 'Scope~~',
- 'Class:RemoteAuthentOAuth/Attribute:scope+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:description' => 'Description~~',
- 'Class:RemoteAuthentOAuth/Attribute:description+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_id' => 'Client id~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_id+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_secret' => 'Client secret~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_secret+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token' => 'Refresh token~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token_expiration' => 'Refresh token expiration~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token_expiration+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:token' => 'Access token~~',
- 'Class:RemoteAuthentOAuth/Attribute:token+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:token_expiration' => 'Access token expiration~~',
- 'Class:RemoteAuthentOAuth/Attribute:token_expiration+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:redirect_url' => 'Redirect url~~',
- 'Class:RemoteAuthentOAuth/Attribute:redirect_url+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:mailbox_list' => 'Mailbox list~~',
- 'Class:RemoteAuthentOAuth/Attribute:mailbox_list+' => '~~',
-]);
-
diff --git a/datamodels/2.x/itop-remote-authent-oauth/fr.dict.itop-remote-authent-oauth.php b/datamodels/2.x/itop-remote-authent-oauth/fr.dict.itop-remote-authent-oauth.php
deleted file mode 100644
index 2c42ef805..000000000
--- a/datamodels/2.x/itop-remote-authent-oauth/fr.dict.itop-remote-authent-oauth.php
+++ /dev/null
@@ -1,58 +0,0 @@
- 'Créer une boite mail...',
- 'Menu:RemoteOAuth' => 'Client OAuth',
- 'Menu:GenerateTokens' => 'Créer un jeton d\'accès...',
- 'Menu:RegenerateTokens' => 'Recréer un jeton d\'accès..',
-
- 'itop-remote-authent-oauth/Operation:CreateMailBox/Title' => 'Création de boite mail',
-
- 'itop-remote-authent-oauth:UsedForSMTP' => 'Ce client Oauth est utilisé pour SMTP',
- 'itop-remote-authent-oauth:TestSMTP' => 'Tester l\'envoi de mail',
- 'itop-remote-authent-oauth:MissingRemoteAuthentOAuth' => 'Il n\'y a pas de client OAuth pour l\'utilisateur %1$s',
- 'itop-remote-authent-oauth:Message:TokenCreated' => 'Le jeton d\'accès à été créé',
- 'itop-remote-authent-oauth:Message:TokenRecreated' => 'Le jeton d\'accès à été renouvelé',
-
- 'Class:RemoteAuthentOAuthGoogle' => 'Client OAuth pour Google',
- 'Class:RemoteAuthentOAuthAzure' => 'Client OAuth pour Microsoft Azure',
-]);
-
-//
-// Class: RemoteAuthentOAuth
-//
-
-Dict::Add('FR FR', 'French', 'Français', [
- 'Class:RemoteAuthentOAuth' => 'Client OAuth',
- 'Class:RemoteAuthentOAuth/Name' => '%1$s-%%2$~',
- 'Class:RemoteAuthentOAuth/Attribute:provider' => 'Fournisseur',
- 'Class:RemoteAuthentOAuth/Attribute:provider+' => '',
- 'Class:RemoteAuthentOAuth/Attribute:name' => 'Login',
- 'Class:RemoteAuthentOAuth/Attribute:name+' => '',
- 'Class:RemoteAuthentOAuth/Attribute:scope' => 'Niveaux d\'accès',
- 'Class:RemoteAuthentOAuth/Attribute:scope+' => '',
- 'Class:RemoteAuthentOAuth/Attribute:description' => 'Description',
- 'Class:RemoteAuthentOAuth/Attribute:description+' => '',
- 'Class:RemoteAuthentOAuth/Attribute:client_id' => 'ID Client',
- 'Class:RemoteAuthentOAuth/Attribute:client_id+' => '',
- 'Class:RemoteAuthentOAuth/Attribute:client_secret' => 'Code secret du client',
- 'Class:RemoteAuthentOAuth/Attribute:client_secret+' => '',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token' => 'Jeton de renouvellement',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token+' => '',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token_expiration' => 'Date d\'expiration du jeton de renouvellement',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token_expiration+' => '',
- 'Class:RemoteAuthentOAuth/Attribute:token' => 'Jeton d\'accès',
- 'Class:RemoteAuthentOAuth/Attribute:token+' => '',
- 'Class:RemoteAuthentOAuth/Attribute:token_expiration' => 'Date d\'expiration du jeton d\'accès',
- 'Class:RemoteAuthentOAuth/Attribute:token_expiration+' => '',
- 'Class:RemoteAuthentOAuth/Attribute:redirect_url' => 'URL de redirection',
- 'Class:RemoteAuthentOAuth/Attribute:redirect_url+' => '',
- 'Class:RemoteAuthentOAuth/Attribute:mailbox_list' => 'Mailbox list',
- 'Class:RemoteAuthentOAuth/Attribute:mailbox_list+' => '',
-]);
-
diff --git a/datamodels/2.x/itop-remote-authent-oauth/hu.dict.itop-remote-authent-oauth.php b/datamodels/2.x/itop-remote-authent-oauth/hu.dict.itop-remote-authent-oauth.php
deleted file mode 100644
index f0c1afce2..000000000
--- a/datamodels/2.x/itop-remote-authent-oauth/hu.dict.itop-remote-authent-oauth.php
+++ /dev/null
@@ -1,59 +0,0 @@
- 'Create a mailbox...~~',
- 'Menu:RemoteOAuth' => 'OAuth Client~~',
- 'Menu:GenerateTokens' => 'Generate access tokens...~~',
- 'Menu:RegenerateTokens' => 'Regenerate access tokens...~~',
-
- 'itop-remote-authent-oauth/Operation:CreateMailBox/Title' => 'Mailbox creation~~',
-
- 'itop-remote-authent-oauth:UsedForSMTP' => 'This OAuth client is used for SMTP~~',
- 'itop-remote-authent-oauth:TestSMTP' => 'Email send test~~',
- 'itop-remote-authent-oauth:MissingRemoteAuthentOAuth' => 'Missing Oauth client for user name %1$s~~',
- 'itop-remote-authent-oauth:Message:TokenCreated' => 'Access token created~~',
- 'itop-remote-authent-oauth:Message:TokenRecreated' => 'Access token regenerated~~',
-
- 'Class:RemoteAuthentOAuthGoogle' => 'OAuth client for Google~~',
- 'Class:RemoteAuthentOAuthAzure' => 'OAuth client for Microsoft Azure~~',
-]);
-
-//
-// Class: RemoteAuthentOAuth
-//
-
-Dict::Add('HU HU', 'Hungarian', 'Magyar', [
- 'Class:RemoteAuthentOAuth' => 'Oauth Client~~',
- 'Class:RemoteAuthentOAuth/Name' => '%1$s-%%2$s~~',
- 'Class:RemoteAuthentOAuth/Attribute:provider' => 'Provider~~',
- 'Class:RemoteAuthentOAuth/Attribute:provider+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:name' => 'Login~~',
- 'Class:RemoteAuthentOAuth/Attribute:name+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:scope' => 'Scope~~',
- 'Class:RemoteAuthentOAuth/Attribute:scope+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:description' => 'Description~~',
- 'Class:RemoteAuthentOAuth/Attribute:description+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_id' => 'Client id~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_id+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_secret' => 'Client secret~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_secret+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token' => 'Refresh token~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token_expiration' => 'Refresh token expiration~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token_expiration+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:token' => 'Access token~~',
- 'Class:RemoteAuthentOAuth/Attribute:token+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:token_expiration' => 'Access token expiration~~',
- 'Class:RemoteAuthentOAuth/Attribute:token_expiration+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:redirect_url' => 'Redirect url~~',
- 'Class:RemoteAuthentOAuth/Attribute:redirect_url+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:mailbox_list' => 'Mailbox list~~',
- 'Class:RemoteAuthentOAuth/Attribute:mailbox_list+' => '~~',
-]);
-
diff --git a/datamodels/2.x/itop-remote-authent-oauth/it.dict.itop-remote-authent-oauth.php b/datamodels/2.x/itop-remote-authent-oauth/it.dict.itop-remote-authent-oauth.php
deleted file mode 100644
index adb15983c..000000000
--- a/datamodels/2.x/itop-remote-authent-oauth/it.dict.itop-remote-authent-oauth.php
+++ /dev/null
@@ -1,59 +0,0 @@
- 'Create a mailbox...~~',
- 'Menu:RemoteOAuth' => 'OAuth Client~~',
- 'Menu:GenerateTokens' => 'Generate access tokens...~~',
- 'Menu:RegenerateTokens' => 'Regenerate access tokens...~~',
-
- 'itop-remote-authent-oauth/Operation:CreateMailBox/Title' => 'Mailbox creation~~',
-
- 'itop-remote-authent-oauth:UsedForSMTP' => 'This OAuth client is used for SMTP~~',
- 'itop-remote-authent-oauth:TestSMTP' => 'Email send test~~',
- 'itop-remote-authent-oauth:MissingRemoteAuthentOAuth' => 'Missing Oauth client for user name %1$s~~',
- 'itop-remote-authent-oauth:Message:TokenCreated' => 'Access token created~~',
- 'itop-remote-authent-oauth:Message:TokenRecreated' => 'Access token regenerated~~',
-
- 'Class:RemoteAuthentOAuthGoogle' => 'OAuth client for Google~~',
- 'Class:RemoteAuthentOAuthAzure' => 'OAuth client for Microsoft Azure~~',
-]);
-
-//
-// Class: RemoteAuthentOAuth
-//
-
-Dict::Add('IT IT', 'Italian', 'Italiano', [
- 'Class:RemoteAuthentOAuth' => 'Oauth Client~~',
- 'Class:RemoteAuthentOAuth/Name' => '%1$s-%%2$s~~',
- 'Class:RemoteAuthentOAuth/Attribute:provider' => 'Provider~~',
- 'Class:RemoteAuthentOAuth/Attribute:provider+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:name' => 'Login~~',
- 'Class:RemoteAuthentOAuth/Attribute:name+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:scope' => 'Scope~~',
- 'Class:RemoteAuthentOAuth/Attribute:scope+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:description' => 'Description~~',
- 'Class:RemoteAuthentOAuth/Attribute:description+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_id' => 'Client id~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_id+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_secret' => 'Client secret~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_secret+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token' => 'Refresh token~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token_expiration' => 'Refresh token expiration~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token_expiration+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:token' => 'Access token~~',
- 'Class:RemoteAuthentOAuth/Attribute:token+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:token_expiration' => 'Access token expiration~~',
- 'Class:RemoteAuthentOAuth/Attribute:token_expiration+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:redirect_url' => 'Redirect url~~',
- 'Class:RemoteAuthentOAuth/Attribute:redirect_url+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:mailbox_list' => 'Mailbox list~~',
- 'Class:RemoteAuthentOAuth/Attribute:mailbox_list+' => '~~',
-]);
-
diff --git a/datamodels/2.x/itop-remote-authent-oauth/ja.dict.itop-remote-authent-oauth.php b/datamodels/2.x/itop-remote-authent-oauth/ja.dict.itop-remote-authent-oauth.php
deleted file mode 100644
index 7e92466c3..000000000
--- a/datamodels/2.x/itop-remote-authent-oauth/ja.dict.itop-remote-authent-oauth.php
+++ /dev/null
@@ -1,59 +0,0 @@
- 'Create a mailbox...~~',
- 'Menu:RemoteOAuth' => 'OAuth Client~~',
- 'Menu:GenerateTokens' => 'Generate access tokens...~~',
- 'Menu:RegenerateTokens' => 'Regenerate access tokens...~~',
-
- 'itop-remote-authent-oauth/Operation:CreateMailBox/Title' => 'Mailbox creation~~',
-
- 'itop-remote-authent-oauth:UsedForSMTP' => 'This OAuth client is used for SMTP~~',
- 'itop-remote-authent-oauth:TestSMTP' => 'Email send test~~',
- 'itop-remote-authent-oauth:MissingRemoteAuthentOAuth' => 'Missing Oauth client for user name %1$s~~',
- 'itop-remote-authent-oauth:Message:TokenCreated' => 'Access token created~~',
- 'itop-remote-authent-oauth:Message:TokenRecreated' => 'Access token regenerated~~',
-
- 'Class:RemoteAuthentOAuthGoogle' => 'OAuth client for Google~~',
- 'Class:RemoteAuthentOAuthAzure' => 'OAuth client for Microsoft Azure~~',
-]);
-
-//
-// Class: RemoteAuthentOAuth
-//
-
-Dict::Add('JA JP', 'Japanese', '日本語', [
- 'Class:RemoteAuthentOAuth' => 'Oauth Client~~',
- 'Class:RemoteAuthentOAuth/Name' => '%1$s-%%2$s~~',
- 'Class:RemoteAuthentOAuth/Attribute:provider' => 'Provider~~',
- 'Class:RemoteAuthentOAuth/Attribute:provider+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:name' => 'Login~~',
- 'Class:RemoteAuthentOAuth/Attribute:name+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:scope' => 'Scope~~',
- 'Class:RemoteAuthentOAuth/Attribute:scope+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:description' => 'Description~~',
- 'Class:RemoteAuthentOAuth/Attribute:description+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_id' => 'Client id~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_id+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_secret' => 'Client secret~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_secret+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token' => 'Refresh token~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token_expiration' => 'Refresh token expiration~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token_expiration+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:token' => 'Access token~~',
- 'Class:RemoteAuthentOAuth/Attribute:token+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:token_expiration' => 'Access token expiration~~',
- 'Class:RemoteAuthentOAuth/Attribute:token_expiration+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:redirect_url' => 'Redirect url~~',
- 'Class:RemoteAuthentOAuth/Attribute:redirect_url+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:mailbox_list' => 'Mailbox list~~',
- 'Class:RemoteAuthentOAuth/Attribute:mailbox_list+' => '~~',
-]);
-
diff --git a/datamodels/2.x/itop-remote-authent-oauth/model.itop-remote-authent-oauth.php b/datamodels/2.x/itop-remote-authent-oauth/model.itop-remote-authent-oauth.php
deleted file mode 100644
index 28da5d3e5..000000000
--- a/datamodels/2.x/itop-remote-authent-oauth/model.itop-remote-authent-oauth.php
+++ /dev/null
@@ -1,5 +0,0 @@
- 'Create a mailbox...~~',
- 'Menu:RemoteOAuth' => 'OAuth Client~~',
- 'Menu:GenerateTokens' => 'Generate access tokens...~~',
- 'Menu:RegenerateTokens' => 'Regenerate access tokens...~~',
-
- 'itop-remote-authent-oauth/Operation:CreateMailBox/Title' => 'Mailbox creation~~',
-
- 'itop-remote-authent-oauth:UsedForSMTP' => 'This OAuth client is used for SMTP~~',
- 'itop-remote-authent-oauth:TestSMTP' => 'Email send test~~',
- 'itop-remote-authent-oauth:MissingRemoteAuthentOAuth' => 'Missing Oauth client for user name %1$s~~',
- 'itop-remote-authent-oauth:Message:TokenCreated' => 'Access token created~~',
- 'itop-remote-authent-oauth:Message:TokenRecreated' => 'Access token regenerated~~',
-
- 'Class:RemoteAuthentOAuthGoogle' => 'OAuth client for Google~~',
- 'Class:RemoteAuthentOAuthAzure' => 'OAuth client for Microsoft Azure~~',
-]);
-
-//
-// Class: RemoteAuthentOAuth
-//
-
-Dict::Add('NL NL', 'Dutch', 'Nederlands', [
- 'Class:RemoteAuthentOAuth' => 'Oauth Client~~',
- 'Class:RemoteAuthentOAuth/Name' => '%1$s-%%2$s~~',
- 'Class:RemoteAuthentOAuth/Attribute:provider' => 'Provider~~',
- 'Class:RemoteAuthentOAuth/Attribute:provider+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:name' => 'Login~~',
- 'Class:RemoteAuthentOAuth/Attribute:name+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:scope' => 'Scope~~',
- 'Class:RemoteAuthentOAuth/Attribute:scope+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:description' => 'Description~~',
- 'Class:RemoteAuthentOAuth/Attribute:description+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_id' => 'Client id~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_id+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_secret' => 'Client secret~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_secret+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token' => 'Refresh token~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token_expiration' => 'Refresh token expiration~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token_expiration+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:token' => 'Access token~~',
- 'Class:RemoteAuthentOAuth/Attribute:token+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:token_expiration' => 'Access token expiration~~',
- 'Class:RemoteAuthentOAuth/Attribute:token_expiration+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:redirect_url' => 'Redirect url~~',
- 'Class:RemoteAuthentOAuth/Attribute:redirect_url+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:mailbox_list' => 'Mailbox list~~',
- 'Class:RemoteAuthentOAuth/Attribute:mailbox_list+' => '~~',
-]);
-
diff --git a/datamodels/2.x/itop-remote-authent-oauth/pt_br.dict.itop-remote-authent-oauth.php b/datamodels/2.x/itop-remote-authent-oauth/pt_br.dict.itop-remote-authent-oauth.php
deleted file mode 100644
index 8140b2143..000000000
--- a/datamodels/2.x/itop-remote-authent-oauth/pt_br.dict.itop-remote-authent-oauth.php
+++ /dev/null
@@ -1,59 +0,0 @@
- 'Create a mailbox...~~',
- 'Menu:RemoteOAuth' => 'OAuth Client~~',
- 'Menu:GenerateTokens' => 'Generate access tokens...~~',
- 'Menu:RegenerateTokens' => 'Regenerate access tokens...~~',
-
- 'itop-remote-authent-oauth/Operation:CreateMailBox/Title' => 'Mailbox creation~~',
-
- 'itop-remote-authent-oauth:UsedForSMTP' => 'This OAuth client is used for SMTP~~',
- 'itop-remote-authent-oauth:TestSMTP' => 'Email send test~~',
- 'itop-remote-authent-oauth:MissingRemoteAuthentOAuth' => 'Missing Oauth client for user name %1$s~~',
- 'itop-remote-authent-oauth:Message:TokenCreated' => 'Access token created~~',
- 'itop-remote-authent-oauth:Message:TokenRecreated' => 'Access token regenerated~~',
-
- 'Class:RemoteAuthentOAuthGoogle' => 'OAuth client for Google~~',
- 'Class:RemoteAuthentOAuthAzure' => 'OAuth client for Microsoft Azure~~',
-]);
-
-//
-// Class: RemoteAuthentOAuth
-//
-
-Dict::Add('PT BR', 'Brazilian', 'Brazilian', [
- 'Class:RemoteAuthentOAuth' => 'Oauth Client~~',
- 'Class:RemoteAuthentOAuth/Name' => '%1$s-%%2$s~~',
- 'Class:RemoteAuthentOAuth/Attribute:provider' => 'Provider~~',
- 'Class:RemoteAuthentOAuth/Attribute:provider+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:name' => 'Login~~',
- 'Class:RemoteAuthentOAuth/Attribute:name+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:scope' => 'Scope~~',
- 'Class:RemoteAuthentOAuth/Attribute:scope+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:description' => 'Description~~',
- 'Class:RemoteAuthentOAuth/Attribute:description+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_id' => 'Client id~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_id+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_secret' => 'Client secret~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_secret+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token' => 'Refresh token~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token_expiration' => 'Refresh token expiration~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token_expiration+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:token' => 'Access token~~',
- 'Class:RemoteAuthentOAuth/Attribute:token+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:token_expiration' => 'Access token expiration~~',
- 'Class:RemoteAuthentOAuth/Attribute:token_expiration+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:redirect_url' => 'Redirect url~~',
- 'Class:RemoteAuthentOAuth/Attribute:redirect_url+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:mailbox_list' => 'Mailbox list~~',
- 'Class:RemoteAuthentOAuth/Attribute:mailbox_list+' => '~~',
-]);
-
diff --git a/datamodels/2.x/itop-remote-authent-oauth/ru.dict.itop-remote-authent-oauth.php b/datamodels/2.x/itop-remote-authent-oauth/ru.dict.itop-remote-authent-oauth.php
deleted file mode 100644
index 64440e9c7..000000000
--- a/datamodels/2.x/itop-remote-authent-oauth/ru.dict.itop-remote-authent-oauth.php
+++ /dev/null
@@ -1,59 +0,0 @@
- 'Create a mailbox...~~',
- 'Menu:RemoteOAuth' => 'OAuth Client~~',
- 'Menu:GenerateTokens' => 'Generate access tokens...~~',
- 'Menu:RegenerateTokens' => 'Regenerate access tokens...~~',
-
- 'itop-remote-authent-oauth/Operation:CreateMailBox/Title' => 'Mailbox creation~~',
-
- 'itop-remote-authent-oauth:UsedForSMTP' => 'This OAuth client is used for SMTP~~',
- 'itop-remote-authent-oauth:TestSMTP' => 'Email send test~~',
- 'itop-remote-authent-oauth:MissingRemoteAuthentOAuth' => 'Missing Oauth client for user name %1$s~~',
- 'itop-remote-authent-oauth:Message:TokenCreated' => 'Access token created~~',
- 'itop-remote-authent-oauth:Message:TokenRecreated' => 'Access token regenerated~~',
-
- 'Class:RemoteAuthentOAuthGoogle' => 'OAuth client for Google~~',
- 'Class:RemoteAuthentOAuthAzure' => 'OAuth client for Microsoft Azure~~',
-]);
-
-//
-// Class: RemoteAuthentOAuth
-//
-
-Dict::Add('RU RU', 'Russian', 'Русский', [
- 'Class:RemoteAuthentOAuth' => 'Oauth Client~~',
- 'Class:RemoteAuthentOAuth/Name' => '%1$s-%%2$s~~',
- 'Class:RemoteAuthentOAuth/Attribute:provider' => 'Provider~~',
- 'Class:RemoteAuthentOAuth/Attribute:provider+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:name' => 'Login~~',
- 'Class:RemoteAuthentOAuth/Attribute:name+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:scope' => 'Scope~~',
- 'Class:RemoteAuthentOAuth/Attribute:scope+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:description' => 'Description~~',
- 'Class:RemoteAuthentOAuth/Attribute:description+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_id' => 'Client id~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_id+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_secret' => 'Client secret~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_secret+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token' => 'Refresh token~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token_expiration' => 'Refresh token expiration~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token_expiration+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:token' => 'Access token~~',
- 'Class:RemoteAuthentOAuth/Attribute:token+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:token_expiration' => 'Access token expiration~~',
- 'Class:RemoteAuthentOAuth/Attribute:token_expiration+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:redirect_url' => 'Redirect url~~',
- 'Class:RemoteAuthentOAuth/Attribute:redirect_url+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:mailbox_list' => 'Mailbox list~~',
- 'Class:RemoteAuthentOAuth/Attribute:mailbox_list+' => '~~',
-]);
-
diff --git a/datamodels/2.x/itop-remote-authent-oauth/sk.dict.itop-remote-authent-oauth.php b/datamodels/2.x/itop-remote-authent-oauth/sk.dict.itop-remote-authent-oauth.php
deleted file mode 100644
index 4e625cddb..000000000
--- a/datamodels/2.x/itop-remote-authent-oauth/sk.dict.itop-remote-authent-oauth.php
+++ /dev/null
@@ -1,59 +0,0 @@
- 'Create a mailbox...~~',
- 'Menu:RemoteOAuth' => 'OAuth Client~~',
- 'Menu:GenerateTokens' => 'Generate access tokens...~~',
- 'Menu:RegenerateTokens' => 'Regenerate access tokens...~~',
-
- 'itop-remote-authent-oauth/Operation:CreateMailBox/Title' => 'Mailbox creation~~',
-
- 'itop-remote-authent-oauth:UsedForSMTP' => 'This OAuth client is used for SMTP~~',
- 'itop-remote-authent-oauth:TestSMTP' => 'Email send test~~',
- 'itop-remote-authent-oauth:MissingRemoteAuthentOAuth' => 'Missing Oauth client for user name %1$s~~',
- 'itop-remote-authent-oauth:Message:TokenCreated' => 'Access token created~~',
- 'itop-remote-authent-oauth:Message:TokenRecreated' => 'Access token regenerated~~',
-
- 'Class:RemoteAuthentOAuthGoogle' => 'OAuth client for Google~~',
- 'Class:RemoteAuthentOAuthAzure' => 'OAuth client for Microsoft Azure~~',
-]);
-
-//
-// Class: RemoteAuthentOAuth
-//
-
-Dict::Add('SK SK', 'Slovak', 'Slovenčina', [
- 'Class:RemoteAuthentOAuth' => 'Oauth Client~~',
- 'Class:RemoteAuthentOAuth/Name' => '%1$s-%%2$s~~',
- 'Class:RemoteAuthentOAuth/Attribute:provider' => 'Provider~~',
- 'Class:RemoteAuthentOAuth/Attribute:provider+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:name' => 'Login~~',
- 'Class:RemoteAuthentOAuth/Attribute:name+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:scope' => 'Scope~~',
- 'Class:RemoteAuthentOAuth/Attribute:scope+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:description' => 'Description~~',
- 'Class:RemoteAuthentOAuth/Attribute:description+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_id' => 'Client id~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_id+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_secret' => 'Client secret~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_secret+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token' => 'Refresh token~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token_expiration' => 'Refresh token expiration~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token_expiration+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:token' => 'Access token~~',
- 'Class:RemoteAuthentOAuth/Attribute:token+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:token_expiration' => 'Access token expiration~~',
- 'Class:RemoteAuthentOAuth/Attribute:token_expiration+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:redirect_url' => 'Redirect url~~',
- 'Class:RemoteAuthentOAuth/Attribute:redirect_url+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:mailbox_list' => 'Mailbox list~~',
- 'Class:RemoteAuthentOAuth/Attribute:mailbox_list+' => '~~',
-]);
-
diff --git a/datamodels/2.x/itop-remote-authent-oauth/src/Model/RemoteAuthentOAuthAzure.php b/datamodels/2.x/itop-remote-authent-oauth/src/Model/RemoteAuthentOAuthAzure.php
deleted file mode 100644
index 877c930ed..000000000
--- a/datamodels/2.x/itop-remote-authent-oauth/src/Model/RemoteAuthentOAuthAzure.php
+++ /dev/null
@@ -1,68 +0,0 @@
- 'cloud',
- 'key_type' => 'autoincrement',
- 'name_attcode' => ['provider', 'name'],
- 'state_attcode' => '',
- 'reconc_keys' => ['provider', 'name'],
- 'db_table' => 'priv_remote_authent_oauth_azure',
- 'db_key_field' => 'id',
- 'icon' => utils::GetAbsoluteUrlModulesRoot().'itop-remote-authent-oauth/assets/img/icons8-azure.svg',
- 'db_finalclass_field' => '',
- );
- MetaModel::Init_Params($aParams);
- MetaModel::Init_InheritAttributes();
-
- MetaModel::Init_SetZListItems('details', [
- 0 => 'name',
- 1 => 'description',
- 2 => 'provider',
- 3 => 'scope',
- 4 => 'redirect_url',
- 5 => 'client_id',
- 6 => 'client_secret',
- 7 => 'mailbox_list',
- ]);
- MetaModel::Init_SetZListItems('standard_search', [
- 0 => 'name',
- 2 => 'provider',
- ]);
- MetaModel::Init_SetZListItems('list', [
- ]);
- }
-
- public function PrefillCreationForm(&$aContextParam)
- {
- $this->Set('provider', 'Azure');
- $this->Set('scope', '');
- $this->Set('redirect_url', OAuthClientProviderAbstract::GetRedirectUri());
-
- parent::PrefillCreationForm($aContextParam);
- }
-
- public function GetDefaultMailServer()
- {
- return 'imap.office365.com';
- }
-
- public function GetAttributeFlags($sAttCode, &$aReasons = array(), $sTargetState = '')
- {
- if ($sAttCode == 'provider' || $sAttCode == 'redirect_url') {
- return OPT_ATT_READONLY;
- }
-
- return parent::GetAttributeFlags($sAttCode, $aReasons, $sTargetState);
- }
-}
\ No newline at end of file
diff --git a/datamodels/2.x/itop-remote-authent-oauth/src/Model/RemoteAuthentOAuthGoogle.php b/datamodels/2.x/itop-remote-authent-oauth/src/Model/RemoteAuthentOAuthGoogle.php
deleted file mode 100644
index 6849c9694..000000000
--- a/datamodels/2.x/itop-remote-authent-oauth/src/Model/RemoteAuthentOAuthGoogle.php
+++ /dev/null
@@ -1,68 +0,0 @@
- 'cloud',
- 'key_type' => 'autoincrement',
- 'name_attcode' => ['provider','name'],
- 'state_attcode' => '',
- 'reconc_keys' => ['provider','name'],
- 'db_table' => 'priv_remote_authent_oauth_google',
- 'db_key_field' => 'id',
- 'icon' => utils::GetAbsoluteUrlModulesRoot().'itop-remote-authent-oauth/assets/img/icons8-google.svg',
- 'db_finalclass_field' => '',
- );
- MetaModel::Init_Params($aParams);
- MetaModel::Init_InheritAttributes();
-
- MetaModel::Init_SetZListItems('details', [
- 0 => 'name',
- 1 => 'description',
- 2 => 'provider',
- 3 => 'scope',
- 4 => 'redirect_url',
- 5 => 'client_id',
- 6 => 'client_secret',
- 7 => 'mailbox_list',
- ]);
- MetaModel::Init_SetZListItems('standard_search', [
- 0 => 'name',
- 2 => 'provider',
- ]);
- MetaModel::Init_SetZListItems('list', [
- ]);
- }
-
- public function PrefillCreationForm(&$aContextParam)
- {
- $this->Set('provider', 'Google');
- $this->Set('scope', 'https://mail.google.com/');
- $this->Set('redirect_url', OAuthClientProviderAbstract::GetRedirectUri());
-
- parent::PrefillCreationForm($aContextParam);
- }
-
- public function GetDefaultMailServer()
- {
- return 'imap.gmail.com';
- }
-
- public function GetAttributeFlags($sAttCode, &$aReasons = array(), $sTargetState = '')
- {
- if ($sAttCode == 'provider' || $sAttCode == 'scope' || $sAttCode == 'redirect_url') {
- return OPT_ATT_READONLY;
- }
-
- return parent::GetAttributeFlags($sAttCode, $aReasons, $sTargetState);
- }
-}
\ No newline at end of file
diff --git a/datamodels/2.x/itop-remote-authent-oauth/src/Service/RemoteAuthentOAuthService.php b/datamodels/2.x/itop-remote-authent-oauth/src/Service/RemoteAuthentOAuthService.php
deleted file mode 100644
index fe8a127f8..000000000
--- a/datamodels/2.x/itop-remote-authent-oauth/src/Service/RemoteAuthentOAuthService.php
+++ /dev/null
@@ -1,47 +0,0 @@
-oRemoteAuthentOAuth = $oRemoteAuthentOAuth;
- }
-
- public function Authenticate(WebPage $oPage)
- {
-
- }
-
-
- public function DisplayAuthentForm(WebPage $oPage)
- {
- $sForm = "\n";
- $oPage->add($sForm);
- }
-}
\ No newline at end of file
diff --git a/datamodels/2.x/itop-remote-authent-oauth/tr.dict.itop-remote-authent-oauth.php b/datamodels/2.x/itop-remote-authent-oauth/tr.dict.itop-remote-authent-oauth.php
deleted file mode 100644
index d6367c3fb..000000000
--- a/datamodels/2.x/itop-remote-authent-oauth/tr.dict.itop-remote-authent-oauth.php
+++ /dev/null
@@ -1,59 +0,0 @@
- 'Create a mailbox...~~',
- 'Menu:RemoteOAuth' => 'OAuth Client~~',
- 'Menu:GenerateTokens' => 'Generate access tokens...~~',
- 'Menu:RegenerateTokens' => 'Regenerate access tokens...~~',
-
- 'itop-remote-authent-oauth/Operation:CreateMailBox/Title' => 'Mailbox creation~~',
-
- 'itop-remote-authent-oauth:UsedForSMTP' => 'This OAuth client is used for SMTP~~',
- 'itop-remote-authent-oauth:TestSMTP' => 'Email send test~~',
- 'itop-remote-authent-oauth:MissingRemoteAuthentOAuth' => 'Missing Oauth client for user name %1$s~~',
- 'itop-remote-authent-oauth:Message:TokenCreated' => 'Access token created~~',
- 'itop-remote-authent-oauth:Message:TokenRecreated' => 'Access token regenerated~~',
-
- 'Class:RemoteAuthentOAuthGoogle' => 'OAuth client for Google~~',
- 'Class:RemoteAuthentOAuthAzure' => 'OAuth client for Microsoft Azure~~',
-]);
-
-//
-// Class: RemoteAuthentOAuth
-//
-
-Dict::Add('TR TR', 'Turkish', 'Türkçe', [
- 'Class:RemoteAuthentOAuth' => 'Oauth Client~~',
- 'Class:RemoteAuthentOAuth/Name' => '%1$s-%%2$s~~',
- 'Class:RemoteAuthentOAuth/Attribute:provider' => 'Provider~~',
- 'Class:RemoteAuthentOAuth/Attribute:provider+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:name' => 'Login~~',
- 'Class:RemoteAuthentOAuth/Attribute:name+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:scope' => 'Scope~~',
- 'Class:RemoteAuthentOAuth/Attribute:scope+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:description' => 'Description~~',
- 'Class:RemoteAuthentOAuth/Attribute:description+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_id' => 'Client id~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_id+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_secret' => 'Client secret~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_secret+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token' => 'Refresh token~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token_expiration' => 'Refresh token expiration~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token_expiration+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:token' => 'Access token~~',
- 'Class:RemoteAuthentOAuth/Attribute:token+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:token_expiration' => 'Access token expiration~~',
- 'Class:RemoteAuthentOAuth/Attribute:token_expiration+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:redirect_url' => 'Redirect url~~',
- 'Class:RemoteAuthentOAuth/Attribute:redirect_url+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:mailbox_list' => 'Mailbox list~~',
- 'Class:RemoteAuthentOAuth/Attribute:mailbox_list+' => '~~',
-]);
-
diff --git a/datamodels/2.x/itop-remote-authent-oauth/vendor/composer/autoload_classmap.php b/datamodels/2.x/itop-remote-authent-oauth/vendor/composer/autoload_classmap.php
deleted file mode 100644
index 540c0b846..000000000
--- a/datamodels/2.x/itop-remote-authent-oauth/vendor/composer/autoload_classmap.php
+++ /dev/null
@@ -1,15 +0,0 @@
- $baseDir . '/src/Controller/AjaxRemoteAuthentOauthController.php',
- 'Combodo\\iTop\\RemoteAuthentOAuth\\Controller\\RemoteAuthentOauthController' => $baseDir . '/src/Controller/RemoteAuthentOauthController.php',
- 'Combodo\\iTop\\RemoteAuthentOAuth\\Service\\ApplicationObjectExtension' => $baseDir . '/src/Service/ApplicationObjectExtension.php',
- 'Combodo\\iTop\\RemoteAuthentOAuth\\Service\\PopupMenuExtension' => $baseDir . '/src/Service/PopupMenuExtension.php',
- 'Combodo\\iTop\\RemoteAuthentOAuth\\Service\\RemoteAuthentOAuthService' => $baseDir . '/src/Service/RemoteAuthentOAuthService.php',
- 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
-);
diff --git a/datamodels/2.x/itop-remote-authent-oauth/zh_cn.dict.itop-remote-authent-oauth.php b/datamodels/2.x/itop-remote-authent-oauth/zh_cn.dict.itop-remote-authent-oauth.php
deleted file mode 100644
index 576063e77..000000000
--- a/datamodels/2.x/itop-remote-authent-oauth/zh_cn.dict.itop-remote-authent-oauth.php
+++ /dev/null
@@ -1,59 +0,0 @@
- 'Create a mailbox...~~',
- 'Menu:RemoteOAuth' => 'OAuth Client~~',
- 'Menu:GenerateTokens' => 'Generate access tokens...~~',
- 'Menu:RegenerateTokens' => 'Regenerate access tokens...~~',
-
- 'itop-remote-authent-oauth/Operation:CreateMailBox/Title' => 'Mailbox creation~~',
-
- 'itop-remote-authent-oauth:UsedForSMTP' => 'This OAuth client is used for SMTP~~',
- 'itop-remote-authent-oauth:TestSMTP' => 'Email send test~~',
- 'itop-remote-authent-oauth:MissingRemoteAuthentOAuth' => 'Missing Oauth client for user name %1$s~~',
- 'itop-remote-authent-oauth:Message:TokenCreated' => 'Access token created~~',
- 'itop-remote-authent-oauth:Message:TokenRecreated' => 'Access token regenerated~~',
-
- 'Class:RemoteAuthentOAuthGoogle' => 'OAuth client for Google~~',
- 'Class:RemoteAuthentOAuthAzure' => 'OAuth client for Microsoft Azure~~',
-]);
-
-//
-// Class: RemoteAuthentOAuth
-//
-
-Dict::Add('ZH CN', 'Chinese', '简体中文', [
- 'Class:RemoteAuthentOAuth' => 'Oauth Client~~',
- 'Class:RemoteAuthentOAuth/Name' => '%1$s-%%2$s~~',
- 'Class:RemoteAuthentOAuth/Attribute:provider' => 'Provider~~',
- 'Class:RemoteAuthentOAuth/Attribute:provider+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:name' => 'Login~~',
- 'Class:RemoteAuthentOAuth/Attribute:name+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:scope' => 'Scope~~',
- 'Class:RemoteAuthentOAuth/Attribute:scope+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:description' => 'Description~~',
- 'Class:RemoteAuthentOAuth/Attribute:description+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_id' => 'Client id~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_id+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_secret' => 'Client secret~~',
- 'Class:RemoteAuthentOAuth/Attribute:client_secret+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token' => 'Refresh token~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token_expiration' => 'Refresh token expiration~~',
- 'Class:RemoteAuthentOAuth/Attribute:refresh_token_expiration+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:token' => 'Access token~~',
- 'Class:RemoteAuthentOAuth/Attribute:token+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:token_expiration' => 'Access token expiration~~',
- 'Class:RemoteAuthentOAuth/Attribute:token_expiration+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:redirect_url' => 'Redirect url~~',
- 'Class:RemoteAuthentOAuth/Attribute:redirect_url+' => '~~',
- 'Class:RemoteAuthentOAuth/Attribute:mailbox_list' => 'Mailbox list~~',
- 'Class:RemoteAuthentOAuth/Attribute:mailbox_list+' => '~~',
-]);
-
diff --git a/setup/email.test.php b/setup/email.test.php
index c5f859c6a..abe8a0ce2 100644
--- a/setup/email.test.php
+++ b/setup/email.test.php
@@ -137,7 +137,7 @@ function CheckEmailSetting($oP)
$sUserName = MetaModel::GetConfig()->Get('email_transport_smtp.username');
$sDisplayUserName = empty($sUserName) ? 'no user ' : $sUserName;
try {
- $oRemoteAuthentOAuth = OAuthClientProviderFactory::GetRemoteAuthentOAuthForSMTP();
+ $oRemoteAuthentOAuth = OAuthClientProviderFactory::GetOAuthClientForSMTP();
$sLink = MetaModel::GetHyperLink(get_class($oRemoteAuthentOAuth), $oRemoteAuthentOAuth->GetKey());
$oP->info("The connection used is: $sLink");
$sProvider = $oRemoteAuthentOAuth->Get('provider');
diff --git a/sources/Core/Authentication/Client/OAuth/OAuthClientProviderAbstract.php b/sources/Core/Authentication/Client/OAuth/OAuthClientProviderAbstract.php
index f99106713..fef5451c7 100644
--- a/sources/Core/Authentication/Client/OAuth/OAuthClientProviderAbstract.php
+++ b/sources/Core/Authentication/Client/OAuth/OAuthClientProviderAbstract.php
@@ -58,14 +58,6 @@ abstract class OAuthClientProviderAbstract implements IOAuthClientProvider
$this->oAccessToken = $oAccessToken;
}
- /**
- * @return string
- */
- public static function GetVendorIcon(): string
- {
- return static::$sVendorIcon;
- }
-
/**
* @return string
*/
@@ -74,31 +66,6 @@ abstract class OAuthClientProviderAbstract implements IOAuthClientProvider
return static::$sVendorName;
}
-
- public static function getConfFromAccessToken($oAccessToken, $sClientId, $sClientSecret): string
- {
- $sAccessToken = $oAccessToken->getToken();
- $sRefreshToken = $oAccessToken->getRefreshToken();
- $sVendor = static::GetVendorName();
-
- return << 'SMTP_OAuth',
-'email_transport_smtp.oauth.provider' => '$sVendor',
-'email_transport_smtp.oauth.client_id' => '$sClientId',
-'email_transport_smtp.oauth.client_secret' => '$sClientSecret',
-'email_transport_smtp.oauth.access_token' => '$sAccessToken',
-'email_transport_smtp.oauth.refresh_token' => '$sRefreshToken',
-EOF;
- }
-
- /**
- * @return array
- */
- public static function GetVendorColors(): array
- {
- return static::$sVendorColors;
- }
-
/**
* @return void
* @throws \Exception
diff --git a/sources/Core/Authentication/Client/OAuth/OAuthClientProviderFactory.php b/sources/Core/Authentication/Client/OAuth/OAuthClientProviderFactory.php
index e42d8c31e..d958fb3ad 100644
--- a/sources/Core/Authentication/Client/OAuth/OAuthClientProviderFactory.php
+++ b/sources/Core/Authentication/Client/OAuth/OAuthClientProviderFactory.php
@@ -18,19 +18,19 @@ class OAuthClientProviderFactory
*/
public static function getProviderForSMTP()
{
- $oRemoteAuthentOAuth = self::GetRemoteAuthentOAuthForSMTP();
+ $oOAuthClient = self::GetOAuthClientForSMTP();
- $sProviderVendor = $oRemoteAuthentOAuth->Get('provider');
+ $sProviderVendor = $oOAuthClient->Get('provider');
$sProviderClass = self::getProviderClass($sProviderVendor);
$aProviderVendorParams = [
- 'clientId' => $oRemoteAuthentOAuth->Get('client_id'),
- 'clientSecret' => $oRemoteAuthentOAuth->Get('client_secret'),
+ 'clientId' => $oOAuthClient->Get('client_id'),
+ 'clientSecret' => $oOAuthClient->Get('client_secret'),
'redirectUri' => $sProviderClass::GetRedirectUri(),
'scope' => $sProviderClass::GetRequiredSMTPScope(),
];
$aAccessTokenParams = [
- "access_token" => $oRemoteAuthentOAuth->Get('token'),
- "refresh_token" => $oRemoteAuthentOAuth->Get('refresh_token'),
+ "access_token" => $oOAuthClient->Get('token'),
+ "refresh_token" => $oOAuthClient->Get('refresh_token'),
'scope' => $sProviderClass::GetRequiredSMTPScope(),
];
$aCollaborators = [
@@ -49,14 +49,20 @@ class OAuthClientProviderFactory
* @throws \MySQLHasGoneAwayException
* @throws \OQLException
*/
- public static function GetRemoteAuthentOAuthForSMTP()
+ public static function GetOAuthClientForSMTP()
{
$sUsername = MetaModel::GetConfig()->Get('email_transport_smtp.username');
- $oSet = new DBObjectSet(DBSearch::FromOQL('SELECT RemoteAuthentOAuth WHERE name=:username', ['username' => $sUsername]));
- if ($oSet->Count() != 1) {
- throw new CoreException(Dict::Format('itop-remote-authent-oauth:MissingRemoteAuthentOAuth', $sUsername));
+ $oSet = new DBObjectSet(DBSearch::FromOQL("SELECT OAuthClient WHERE name=:username", ['username' => $sUsername]));
+ if ($oSet->Count() < 1) {
+ throw new CoreException(Dict::Format('itop-oauth-client:MissingOAuthClient', $sUsername));
}
- return $oSet->Fetch();
+ while ($oOAuthClient = $oSet->Fetch()) {
+ $sScope = $oOAuthClient->Get('scope');
+ if ($sScope == 'SMTP' || $sScope == 'EMail') {
+ return $oOAuthClient;
+ }
+ }
+ throw new CoreException(Dict::Format('itop-oauth-client:MissingOAuthClient', $sUsername));
}
/**
diff --git a/sources/Core/Email/EmailLaminas.php b/sources/Core/Email/EmailLaminas.php
index 3c2a48d6e..5ba05c205 100644
--- a/sources/Core/Email/EmailLaminas.php
+++ b/sources/Core/Email/EmailLaminas.php
@@ -189,6 +189,7 @@ class EMailLaminas extends Email
$oOptions = new SmtpOptions($aOptions);
$oTransport->setOptions($oOptions);
break;
+
case 'SMTP_OAuth':
$sHost = self::$m_oConfig->Get('email_transport_smtp.host');
$sPort = self::$m_oConfig->Get('email_transport_smtp.port');
@@ -212,6 +213,7 @@ class EMailLaminas extends Email
\Laminas\Mail\Protocol\Smtp\Auth\Oauth::setProvider(OAuthClientProviderFactory::getProviderForSMTP());
break;
+
case 'Null':
$oTransport = new Smtp();
break;