mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
N°5102 - Allow to send emails using GSuite SMTP and OAuth - Rework
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
<module>combodo-db-tools</module>
|
||||
<module>itop-core-update</module>
|
||||
<module>itop-hub-connector</module>
|
||||
<module>itop-remote-authent-oauth</module>
|
||||
<module>itop-oauth-client</module>
|
||||
</modules>
|
||||
<mandatory>true</mandatory>
|
||||
</choice>
|
||||
|
||||
2
datamodels/2.x/itop-oauth-client/README.md
Normal file
2
datamodels/2.x/itop-oauth-client/README.md
Normal file
@@ -0,0 +1,2 @@
|
||||
# Extension OAuth 2.0 client
|
||||
|
||||
@@ -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();
|
||||
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 977 B After Width: | Height: | Size: 977 B |
@@ -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": {
|
||||
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2013 XXXXX
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
Dict::Add('CS CZ', 'Czech', 'Čeština', [
|
||||
'Menu:CreateMailbox' => '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)~~',
|
||||
]);
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2013 XXXXX
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
Dict::Add('DA DA', 'Danish', 'Dansk', [
|
||||
'Menu:CreateMailbox' => '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)~~',
|
||||
]);
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.7">
|
||||
<constants/>
|
||||
<classes>
|
||||
<class id="RemoteAuthentOAuth" _delta="define">
|
||||
<class id="OAuthClient" _delta="define">
|
||||
<parent>cmdbAbstractObject</parent>
|
||||
<properties>
|
||||
<category>cloud,searchable</category>
|
||||
<abstract>true</abstract>
|
||||
<key_type>autoincrement</key_type>
|
||||
<db_table>priv_remote_authent_oauth</db_table>
|
||||
<db_table>priv_oauth_client</db_table>
|
||||
<db_key_field>id</db_key_field>
|
||||
<db_final_class_field/>
|
||||
<naming>
|
||||
@@ -25,27 +25,6 @@
|
||||
<attribute id="name"/>
|
||||
</attributes>
|
||||
</reconciliation>
|
||||
<uniqueness_rules>
|
||||
<rule id="Username">
|
||||
<attributes>
|
||||
<attribute id="name"/>
|
||||
</attributes>
|
||||
<filter/>
|
||||
<disabled>false</disabled>
|
||||
<is_blocking>true</is_blocking>
|
||||
</rule>
|
||||
<rule id="OAuth Server">
|
||||
<attributes>
|
||||
<attribute id="provider"/>
|
||||
<attribute id="scope"/>
|
||||
<attribute id="client_id"/>
|
||||
<attribute id="client_secret"/>
|
||||
</attributes>
|
||||
<filter/>
|
||||
<disabled>false</disabled>
|
||||
<is_blocking>true</is_blocking>
|
||||
</rule>
|
||||
</uniqueness_rules>
|
||||
</properties>
|
||||
<fields>
|
||||
<field id="provider" xsi:type="AttributeString">
|
||||
@@ -58,11 +37,6 @@
|
||||
<default_value/>
|
||||
<is_null_allowed>false</is_null_allowed>
|
||||
</field>
|
||||
<field id="scope" xsi:type="AttributeString">
|
||||
<sql>scope</sql>
|
||||
<default_value/>
|
||||
<is_null_allowed>true</is_null_allowed>
|
||||
</field>
|
||||
<field id="description" xsi:type="AttributeText">
|
||||
<sql>description</sql>
|
||||
<default_value/>
|
||||
@@ -110,7 +84,7 @@
|
||||
</field>
|
||||
<field id="mailbox_list" xsi:type="AttributeLinkedSet">
|
||||
<linked_class>MailInboxOAuth</linked_class>
|
||||
<ext_key_to_me>remote_authent_oauth_id</ext_key_to_me>
|
||||
<ext_key_to_me>oauth_client_id</ext_key_to_me>
|
||||
<count_min>0</count_min>
|
||||
<count_max>0</count_max>
|
||||
</field>
|
||||
@@ -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("<b>$sLabel</b> <a href='$sTestURL' target='_blank'>$sTestLabel</a>");
|
||||
}
|
||||
@@ -169,9 +144,6 @@
|
||||
<item id="provider">
|
||||
<rank>3</rank>
|
||||
</item>
|
||||
<item id="scope">
|
||||
<rank>4</rank>
|
||||
</item>
|
||||
<item id="redirect_url">
|
||||
<rank>5</rank>
|
||||
</item>
|
||||
@@ -210,10 +182,14 @@
|
||||
</class>
|
||||
</classes>
|
||||
<menus>
|
||||
<menu id="RemoteOAuth" xsi:type="SearchMenuNode" _delta="define">
|
||||
<menu id="OAuthClient" xsi:type="OQLMenuNode" _delta="define">
|
||||
<rank>100</rank>
|
||||
<parent>ConfigurationTools</parent>
|
||||
<class>RemoteAuthentOAuth</class>
|
||||
<oql><![CDATA[SELECT OAuthClient]]></oql>
|
||||
<do_search>1</do_search>
|
||||
<enable_admin_only>0</enable_admin_only>
|
||||
<enable_class>OAuthClient</enable_class>
|
||||
<enable_action>UR_ACTION_READ</enable_action>
|
||||
</menu>
|
||||
</menus>
|
||||
<user_rights>
|
||||
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2013 XXXXX
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
Dict::Add('DE DE', 'German', 'Deutsch', [
|
||||
'Menu:CreateMailbox' => '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)~~',
|
||||
]);
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2013 XXXXX
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
Dict::Add('EN US', 'English', 'English', [
|
||||
'Menu:CreateMailbox' => '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)',
|
||||
]);
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2013 XXXXX
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
Dict::Add('ES CR', 'Spanish', 'Español, Castellaño', [
|
||||
'Menu:CreateMailbox' => '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)~~',
|
||||
]);
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2013 XXXXX
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
Dict::Add('FR FR', 'French', 'Français', [
|
||||
'Menu:CreateMailbox' => '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$~',
|
||||
));
|
||||
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2013 XXXXX
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
Dict::Add('HU HU', 'Hungarian', 'Magyar', [
|
||||
'Menu:CreateMailbox' => '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)~~',
|
||||
]);
|
||||
|
||||
@@ -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();
|
||||
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2013 XXXXX
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', [
|
||||
'Menu:CreateMailbox' => '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)~~',
|
||||
]);
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2013 XXXXX
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
Dict::Add('JA JP', 'Japanese', '日本語', [
|
||||
'Menu:CreateMailbox' => '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)~~',
|
||||
]);
|
||||
|
||||
@@ -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',
|
||||
),
|
||||
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2013 XXXXX
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
Dict::Add('NL NL', 'Dutch', 'Nederlands', [
|
||||
'Menu:CreateMailbox' => '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)~~',
|
||||
]);
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2013 XXXXX
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', [
|
||||
'Menu:CreateMailbox' => '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)~~',
|
||||
]);
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2013 XXXXX
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
Dict::Add('RU RU', 'Russian', 'Русский', [
|
||||
'Menu:CreateMailbox' => '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)~~',
|
||||
]);
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2013 XXXXX
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
Dict::Add('SK SK', 'Slovak', 'Slovenčina', [
|
||||
'Menu:CreateMailbox' => '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)~~',
|
||||
]);
|
||||
|
||||
@@ -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
|
||||
@@ -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);
|
||||
147
datamodels/2.x/itop-oauth-client/src/Model/OAuthClientAzure.php
Normal file
147
datamodels/2.x/itop-oauth-client/src/Model/OAuthClientAzure.php
Normal file
@@ -0,0 +1,147 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2022 Combodo SARL
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
use Combodo\iTop\Core\Authentication\Client\OAuth\OAuthClientProviderAbstract;
|
||||
|
||||
class OAuthClientAzure extends OAuthClient
|
||||
{
|
||||
public static function Init()
|
||||
{
|
||||
$aParams = [
|
||||
'category' => '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
|
||||
);
|
||||
}
|
||||
}
|
||||
145
datamodels/2.x/itop-oauth-client/src/Model/OAuthClientGoogle.php
Normal file
145
datamodels/2.x/itop-oauth-client/src/Model/OAuthClientGoogle.php
Normal file
@@ -0,0 +1,145 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2022 Combodo SARL
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
use Combodo\iTop\Core\Authentication\Client\OAuth\OAuthClientProviderAbstract;
|
||||
|
||||
class OAuthClientGoogle extends OAuthClient
|
||||
{
|
||||
public static function Init()
|
||||
{
|
||||
$aParams = array
|
||||
(
|
||||
'category' => '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
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2013 XXXXX
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
Dict::Add('TR TR', 'Turkish', 'Türkçe', [
|
||||
'Menu:CreateMailbox' => '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)~~',
|
||||
]);
|
||||
|
||||
14
datamodels/2.x/itop-oauth-client/vendor/composer/autoload_classmap.php
vendored
Normal file
14
datamodels/2.x/itop-oauth-client/vendor/composer/autoload_classmap.php
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
// autoload_classmap.php @generated by Composer
|
||||
|
||||
$vendorDir = dirname(dirname(__FILE__));
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
'Combodo\\iTop\\OAuthClient\\Controller\\AjaxOauthClientController' => $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',
|
||||
);
|
||||
@@ -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'),
|
||||
);
|
||||
@@ -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',
|
||||
);
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2013 XXXXX
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
Dict::Add('ZH CN', 'Chinese', '简体中文', [
|
||||
'Menu:CreateMailbox' => '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)~~',
|
||||
]);
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
# Extension Remote authentication for OAuth 2.0
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2013 XXXXX
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
Dict::Add('CS CZ', 'Czech', 'Čeština', [
|
||||
'Menu:CreateMailbox' => '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+' => '~~',
|
||||
]);
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2013 XXXXX
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
Dict::Add('DA DA', 'Danish', 'Dansk', [
|
||||
'Menu:CreateMailbox' => '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+' => '~~',
|
||||
]);
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2013 XXXXX
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
Dict::Add('DE DE', 'German', 'Deutsch', [
|
||||
'Menu:CreateMailbox' => '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+' => '~~',
|
||||
]);
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2013 XXXXX
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
Dict::Add('EN US', 'English', 'English', [
|
||||
'Menu:CreateMailbox' => '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+' => '',
|
||||
]);
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2013 XXXXX
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
Dict::Add('ES CR', 'Spanish', 'Español, Castellaño', [
|
||||
'Menu:CreateMailbox' => '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+' => '~~',
|
||||
]);
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2013 XXXXX
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
Dict::Add('FR FR', 'French', 'Français', [
|
||||
'Menu:CreateMailbox' => '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+' => '',
|
||||
]);
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2013 XXXXX
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
Dict::Add('HU HU', 'Hungarian', 'Magyar', [
|
||||
'Menu:CreateMailbox' => '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+' => '~~',
|
||||
]);
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2013 XXXXX
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', [
|
||||
'Menu:CreateMailbox' => '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+' => '~~',
|
||||
]);
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2013 XXXXX
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
Dict::Add('JA JP', 'Japanese', '日本語', [
|
||||
'Menu:CreateMailbox' => '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+' => '~~',
|
||||
]);
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
<?php
|
||||
//
|
||||
// File generated
|
||||
// Please do not edit manually
|
||||
//
|
||||
@@ -1,59 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2013 XXXXX
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
Dict::Add('NL NL', 'Dutch', 'Nederlands', [
|
||||
'Menu:CreateMailbox' => '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+' => '~~',
|
||||
]);
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2013 XXXXX
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', [
|
||||
'Menu:CreateMailbox' => '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+' => '~~',
|
||||
]);
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2013 XXXXX
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
Dict::Add('RU RU', 'Russian', 'Русский', [
|
||||
'Menu:CreateMailbox' => '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+' => '~~',
|
||||
]);
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2013 XXXXX
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
Dict::Add('SK SK', 'Slovak', 'Slovenčina', [
|
||||
'Menu:CreateMailbox' => '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+' => '~~',
|
||||
]);
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2022 Combodo SARL
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
use Combodo\iTop\Core\Authentication\Client\OAuth\OAuthClientProviderAbstract;
|
||||
|
||||
class RemoteAuthentOAuthAzure extends RemoteAuthentOAuth
|
||||
{
|
||||
public static function Init()
|
||||
{
|
||||
$aParams = array
|
||||
(
|
||||
'category' => '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);
|
||||
}
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2022 Combodo SARL
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
use Combodo\iTop\Core\Authentication\Client\OAuth\OAuthClientProviderAbstract;
|
||||
|
||||
class RemoteAuthentOAuthGoogle extends RemoteAuthentOAuth
|
||||
{
|
||||
public static function Init()
|
||||
{
|
||||
$aParams = array
|
||||
(
|
||||
'category' => '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);
|
||||
}
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2022 Combodo SARL
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
namespace Combodo\iTop\RemoteAuthentOAuth\Service;
|
||||
|
||||
use RemoteAuthentOAuth;
|
||||
use WebPage;
|
||||
|
||||
class RemoteAuthentOAuthService
|
||||
{
|
||||
/**
|
||||
* @var \RemoteAuthentOAuth
|
||||
*/
|
||||
protected $oRemoteAuthentOAuth;
|
||||
|
||||
/**
|
||||
* @param \RemoteAuthentOAuth $oRemoteAuthentOAuth
|
||||
*/
|
||||
public function __construct(RemoteAuthentOAuth $oRemoteAuthentOAuth)
|
||||
{
|
||||
$this->oRemoteAuthentOAuth = $oRemoteAuthentOAuth;
|
||||
}
|
||||
|
||||
public function Authenticate(WebPage $oPage)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function DisplayAuthentForm(WebPage $oPage)
|
||||
{
|
||||
$sForm = "<form>\n";
|
||||
$sForm .= "<input type='hidden' name='additional' value=''/>\n";
|
||||
|
||||
foreach (['provider', 'client_id', 'client_secret', 'scope'] as $sAttCode) {
|
||||
$sValue = $this->oRemoteAuthentOAuth->Get($sAttCode);
|
||||
$sForm .= "<input type='hidden' name='$sAttCode' value='$sValue'/>\n";
|
||||
}
|
||||
$sForm .= "<button class=\"ibo-oauth-wizard--form--submit\" type=\"submit\">Authentication</button>\n";
|
||||
|
||||
$sForm .= "</form>\n";
|
||||
$oPage->add($sForm);
|
||||
}
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2013 XXXXX
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
Dict::Add('TR TR', 'Turkish', 'Türkçe', [
|
||||
'Menu:CreateMailbox' => '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+' => '~~',
|
||||
]);
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
<?php
|
||||
|
||||
// autoload_classmap.php @generated by Composer
|
||||
|
||||
$vendorDir = dirname(dirname(__FILE__));
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
'Combodo\\iTop\\RemoteAuthentOAuth\\Controller\\AjaxRemoteAuthentOauthController' => $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',
|
||||
);
|
||||
@@ -1,59 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2013 XXXXX
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
Dict::Add('ZH CN', 'Chinese', '简体中文', [
|
||||
'Menu:CreateMailbox' => '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+' => '~~',
|
||||
]);
|
||||
|
||||
@@ -137,7 +137,7 @@ function CheckEmailSetting($oP)
|
||||
$sUserName = MetaModel::GetConfig()->Get('email_transport_smtp.username');
|
||||
$sDisplayUserName = empty($sUserName) ? '<em>no user</em> ' : $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');
|
||||
|
||||
@@ -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 <<<EOF
|
||||
'email_transport' => '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
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user