Permalink
Browse files

Move Auth and Authfront in new namespaces, respectively Auth\Driver a…

…nd Auth\Frontend
  • Loading branch information...
1 parent 60e7b26 commit 7ea41f4652ee997cae144f3d0ec6c962c99603a1 @cdujeu cdujeu committed Jun 22, 2016
Showing with 1,159 additions and 879 deletions.
  1. +2 −2 core/src/core/src/pydio/Core/Controller/CliRunner.php
  2. +2 −2 core/src/core/src/pydio/Core/Http/Cli/AuthCliMiddleware.php
  3. +2 −2 core/src/core/src/pydio/Core/Http/Dav/AuthBackendBasic.php
  4. +2 −2 core/src/core/src/pydio/Core/Http/Dav/AuthBackendDigest.php
  5. +1 −1 core/src/core/src/pydio/Core/Http/Middleware/AuthMiddleware.php
  6. +1 −1 core/src/core/src/pydio/Core/Http/Rest/RestAuthMiddleware.php
  7. +3 −3 core/src/core/src/pydio/Core/Services/AuthService.php
  8. +3 −3 core/src/plugins/access.fs/class.fsAccessDriver.php
  9. +2 −2 core/src/plugins/access.ftp/class.ftpAccessWrapper.php
  10. +3 −3 core/src/plugins/access.sftp/class.sftpAccessWrapper.php
  11. +3 −3 core/src/plugins/access.sftp_psl/class.sftpPSLAccessWrapper.php
  12. +2 −2 core/src/plugins/access.smb/class.smbAccessWrapper.php
  13. +102 −31 core/src/plugins/auth.custom_db/{class.customDbAuthDriver.php → CustomDbAuthDriver.php}
  14. +1 −1 core/src/plugins/auth.custom_db/manifest.xml
  15. +23 −26 core/src/plugins/auth.ftp/{class.ftpAuthDriver.php → FtpAuthDriver.php}
  16. +42 −0 core/src/plugins/auth.ftp/FtpSonWrapper.php
  17. +1 −1 core/src/plugins/auth.ftp/manifest.xml
  18. +24 −25 core/src/plugins/auth.ldap/{class.ldapAuthDriver.php → LdapAuthDriver.php}
  19. +1 −1 core/src/plugins/auth.ldap/manifest.xml
  20. +134 −28 core/src/plugins/auth.multi/{class.multiAuthDriver.php → MultiAuthDriver.php}
  21. +1 −1 core/src/plugins/auth.multi/manifest.xml
  22. +35 −22 core/src/plugins/auth.radius/{class.radiusAuthDriver.php → RadiusAuthDriver.php}
  23. +1 −1 core/src/plugins/auth.radius/manifest.xml
  24. +49 −46 core/src/plugins/auth.remote/{class.remoteAuthDriver.php → RemoteAuthDriver.php}
  25. +1 −1 core/src/plugins/auth.remote/manifest.xml
  26. +0 −78 core/src/plugins/auth.remote_ajxp/class.remote_ajxpAuthDriver.php
  27. +0 −36 core/src/plugins/auth.remote_ajxp/i18n/conf/de.php
  28. +0 −36 core/src/plugins/auth.remote_ajxp/i18n/conf/en.php
  29. +0 −36 core/src/plugins/auth.remote_ajxp/i18n/conf/fr.php
  30. +0 −36 core/src/plugins/auth.remote_ajxp/i18n/conf/it.php
  31. +0 −36 core/src/plugins/auth.remote_ajxp/i18n/conf/pt.php
  32. +0 −27 core/src/plugins/auth.remote_ajxp/manifest.xml
  33. +0 −1 core/src/plugins/auth.remote_ajxp/plugin_doc.html
  34. +69 −22 core/src/plugins/auth.smb/{class.smbAuthDriver.php → SmbAuthDriver.php}
  35. +1 −1 core/src/plugins/auth.smb/manifest.xml
  36. +96 −28 core/src/plugins/auth.sql/{class.sqlAuthDriver.php → SqlAuthDriver.php}
  37. +1 −1 core/src/plugins/auth.sql/manifest.xml
  38. +63 −32 core/src/plugins/authfront.cas/{class.CasAuthFrontend.php → CasAuthFrontend.php}
  39. +16 −2 core/src/plugins/authfront.cas/LogoutUrlMessage.php
  40. +1 −1 core/src/plugins/authfront.cas/manifest.xml
  41. +49 −39 core/src/plugins/authfront.cyphered/{class.CypheredAuthFrontend.php → CypheredAuthFrontend.php}
  42. +1 −1 core/src/plugins/authfront.cyphered/manifest.xml
  43. +53 −35 core/src/plugins/authfront.duosecurity/{class.DuoSecurityFrontend.php → DuoSecurityFrontend.php}
  44. +1 −1 core/src/plugins/authfront.duosecurity/manifest.xml
  45. +21 −17 core/src/plugins/authfront.http_basic/{class.BasicHttpAuthFrontend.php → BasicHttpAuthFrontend.php}
  46. +1 −1 core/src/plugins/authfront.http_basic/manifest.xml
  47. +27 −9 ...src/plugins/authfront.http_server/{class.ServerHttpAuthFrontend.php → ServerHttpAuthFrontend.php}
  48. +1 −1 core/src/plugins/authfront.http_server/manifest.xml
  49. +57 −48 core/src/plugins/authfront.keystore/{class.KeystoreAuthFrontend.php → KeystoreAuthFrontend.php}
  50. +1 −1 core/src/plugins/authfront.keystore/manifest.xml
  51. +40 −12 core/src/plugins/authfront.multi/{class.MultiAuthFrontend.php → MultiAuthFrontend.php}
  52. +1 −1 core/src/plugins/authfront.multi/manifest.xml
  53. +114 −61 core/src/plugins/authfront.otp/{class.OtpAuthFrontend.php → OtpAuthFrontend.php}
  54. +1 −1 core/src/plugins/authfront.otp/manifest.xml
  55. +37 −29 core/src/plugins/authfront.session_login/{class.SessionLoginFrontend.php → SessionLoginFrontend.php}
  56. +1 −1 core/src/plugins/authfront.session_login/manifest.xml
  57. +22 −4 core/src/plugins/authfront.webftp/{class.FTPAuthFrontend.php → FTPAuthFrontend.php}
  58. +1 −1 core/src/plugins/authfront.webftp/manifest.xml
  59. +2 −2 core/src/plugins/core.access/src/Stream/AuthStream.php
  60. +2 −2 core/src/plugins/core.access/src/Stream/AuthWrapper.php
  61. 0 core/src/plugins/core.auth/{class.AbstractAuthDriver.php → AbstractAuthDriver.php}
  62. +20 −12 core/src/plugins/core.auth/{class.CoreAuthLoader.php → CoreAuthLoader.php}
  63. +10 −10 core/src/plugins/core.auth/{class.AJXP_Safe.php → MemorySafe.php}
  64. +1 −1 core/src/plugins/core.auth/manifest.xml
  65. +1 −1 core/src/plugins/core.authfront/{class.AbstractAuthFrontend.php → AbstractAuthFrontend.php}
  66. +2 −1 core/src/plugins/core.authfront/{class.FrontendsLoader.php → FrontendsLoader.php}
  67. +1 −1 core/src/plugins/core.authfront/manifest.xml
  68. +3 −3 core/src/plugins/meta.mount/FilesystemMounter.php
@@ -20,7 +20,7 @@
*/
namespace Pydio\Core\Controller;
-use Pydio\Auth\Core\AJXP_Safe;
+use Pydio\Auth\Core\MemorySafe;
use Pydio\Core\Model\ContextInterface;
use Pydio\Core\Services\ConfService;
use Pydio\Core\Services\UsersService;
@@ -109,7 +109,7 @@ public static function applyActionInBackground(ContextInterface $ctx, $actionNam
$repoObject = $ctx->getRepository();
$clearEnv = false;
if ($repoObject->getContextOption($ctx, "USE_SESSION_CREDENTIALS")) {
- $encodedCreds = AJXP_Safe::getEncodedCredentialString();
+ $encodedCreds = MemorySafe::getEncodedCredentialString();
if (!empty($encodedCreds)) {
putenv("AJXP_SAFE_CREDENTIALS=" . $encodedCreds);
$clearEnv = "AJXP_SAFE_CREDENTIALS";
@@ -22,7 +22,7 @@
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
-use Pydio\Auth\Core\AJXP_Safe;
+use Pydio\Auth\Core\MemorySafe;
use Pydio\Core\Exception\AuthRequiredException;
use Pydio\Core\Exception\LoginException;
@@ -129,7 +129,7 @@ public static function handleRequest(ServerRequestInterface $requestInterface, R
$optUser = trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, md5($optToken.$cKey), base64_decode($optUser), MCRYPT_MODE_ECB), "\0");
$env = getenv("AJXP_SAFE_CREDENTIALS");
if(!empty($env)){
- $array = AJXP_Safe::getCredentialsFromEncodedString($env);
+ $array = MemorySafe::getCredentialsFromEncodedString($env);
if(isSet($array["user"]) && $array["user"] == $optUser){
unset($optToken);
$optPass = $array["password"];
@@ -21,7 +21,7 @@
namespace Pydio\Core\Http\Dav;
-use Pydio\Auth\Core\AJXP_Safe;
+use Pydio\Auth\Core\MemorySafe;
use Pydio\Core\Exception\LoginException;
use Pydio\Core\Exception\RepositoryLoadException;
use Pydio\Core\Exception\UserNotFoundException;
@@ -142,7 +142,7 @@ public function authenticate(Sabre\DAV\Server $server, $realm)
// NOW UPDATE CONTEXT
$this->context->setUserId($this->currentUser);
if (ConfService::getContextConf($this->context, "SESSION_SET_CREDENTIALS", "auth")) {
- AJXP_Safe::storeCredentials($this->currentUser, $userpass[1]);
+ MemorySafe::storeCredentials($this->currentUser, $userpass[1]);
}
//PluginsService::getInstance($this->context);
AJXP_Logger::updateContext($this->context);
@@ -30,7 +30,7 @@
use Pydio\Core\Services\UsersService;
use Pydio\Core\Utils\TextEncoder;
use \Sabre;
-use Pydio\Auth\Core\AJXP_Safe;
+use Pydio\Auth\Core\MemorySafe;
use Pydio\Core\Model\ContextInterface;
use Pydio\Core\Services\AuthService;
use Pydio\Core\Services\ConfService;
@@ -144,7 +144,7 @@ public function authenticate(Sabre\DAV\Server $server, $realm)
}
if (ConfService::getContextConf($this->context, "SESSION_SET_CREDENTIALS", "auth")) {
$webdavData = $loggedUser->getPref("AJXP_WEBDAV_DATA");
- AJXP_Safe::storeCredentials($this->currentUser, $this->_decodePassword($webdavData["PASS"], $this->currentUser));
+ MemorySafe::storeCredentials($this->currentUser, $this->_decodePassword($webdavData["PASS"], $this->currentUser));
}
// NOW UPDATE CONTEXT
@@ -21,7 +21,7 @@
namespace Pydio\Core\Http\Middleware;
use Psr\Http\Message\ServerRequestInterface;
-use Pydio\Authfront\Core\FrontendsLoader;
+use Pydio\Auth\Frontend\Core\FrontendsLoader;
use Pydio\Core\Exception\ActionNotFoundException;
use Pydio\Core\Exception\AuthRequiredException;
use Pydio\Core\Exception\NoActiveWorkspaceException;
@@ -21,7 +21,7 @@
namespace Pydio\Core\Http\Rest;
use Psr\Http\Message\ServerRequestInterface;
-use Pydio\Authfront\Core\FrontendsLoader;
+use Pydio\Auth\Frontend\Core\FrontendsLoader;
use Pydio\Core\Exception\NoActiveWorkspaceException;
use Pydio\Core\Exception\PydioException;
use Pydio\Core\Exception\WorkspaceForbiddenException;
@@ -19,7 +19,7 @@
* The latest code can be found at <http://pyd.io/>.
*/
namespace Pydio\Core\Services;
-use Pydio\Auth\Core\AJXP_Safe;
+use Pydio\Auth\Core\MemorySafe;
use Pydio\Conf\Core\AbstractAjxpUser;
use Pydio\Core\Controller\Controller;
use Pydio\Core\Exception\LoginException;
@@ -118,7 +118,7 @@ public static function logUser($user_id, $pwd, $bypass_pwd = false, $cookieLogin
// Setting session credentials if asked in config
if (ConfService::getContextConf(Context::contextWithObjects($user, null), "SESSION_SET_CREDENTIALS", "auth")) {
list($authId, $authPwd) = $authDriver->filterCredentials($user_id, $pwd);
- AJXP_Safe::storeCredentials($authId, $authPwd);
+ MemorySafe::storeCredentials($authId, $authPwd);
}
@@ -173,7 +173,7 @@ public static function disconnect()
unset($_SESSION["AJXP_USER"]);
//if(isSet(self::$currentUser)) unset(self::$currentUser);
if (ConfService::getContextConf(Context::contextWithObjects($user, null), "SESSION_SET_CREDENTIALS", "auth")) {
- AJXP_Safe::clearCredentials();
+ MemorySafe::clearCredentials();
}
Controller::applyHook("user.after_disconnect", array(Context::emptyContext(), $userId));
}
@@ -37,7 +37,7 @@
use Pydio\Access\Core\RecycleBinManager;
use Pydio\Access\Core\Model\Repository;
use Pydio\Access\Core\Model\UserSelection;
-use Pydio\Auth\Core\AJXP_Safe;
+use Pydio\Auth\Core\MemorySafe;
use Pydio\Core\Http\Response\FileReaderResponse;
use Pydio\Core\Http\Response\SerializableResponseStream;
use Pydio\Core\Http\Message\UserMessage;
@@ -2327,7 +2327,7 @@ public function makeSharedRepositoryOptions(ContextInterface $ctx, $httpVars)
"DATA_TEMPLATE" => ""
];
if ($repository->getContextOption($ctx, "USE_SESSION_CREDENTIALS") === true) {
- $newOptions["ENCODED_CREDENTIALS"] = AJXP_Safe::getEncodedCredentialString();
+ $newOptions["ENCODED_CREDENTIALS"] = MemorySafe::getEncodedCredentialString();
}
$customData = [];
foreach ($httpVars as $key => $value) {
@@ -2342,7 +2342,7 @@ public function makeSharedRepositoryOptions(ContextInterface $ctx, $httpVars)
$newOptions["META_SOURCES"] = $repository->getContextOption($ctx, "META_SOURCES");
foreach ($newOptions["META_SOURCES"] as $index => &$data) {
if (isSet($data["USE_SESSION_CREDENTIALS"]) && $data["USE_SESSION_CREDENTIALS"] === true) {
- $newOptions["META_SOURCES"][$index]["ENCODED_CREDENTIALS"] = AJXP_Safe::getEncodedCredentialString();
+ $newOptions["META_SOURCES"][$index]["ENCODED_CREDENTIALS"] = MemorySafe::getEncodedCredentialString();
}
}
Controller::applyHook("workspace.share_metasources", [$ctx, &$newOptions["META_SOURCES"]]);
@@ -24,7 +24,7 @@
use Pydio\Access\Core\AbstractAccessDriver;
use Pydio\Access\Core\IAjxpWrapper;
use Pydio\Access\Core\Model\AJXP_Node;
-use Pydio\Auth\Core\AJXP_Safe;
+use Pydio\Auth\Core\MemorySafe;
use Pydio\Core\Model\ContextInterface;
@@ -452,7 +452,7 @@ protected function parseUrl($url, $forceLogin = false)
throw new \Exception("Cannot find repository for dynamic ftp authentication.");
}
$ctx = $node->getContext();
- $credentials = AJXP_Safe::tryLoadingCredentialsFromSources($node->getContext());
+ $credentials = MemorySafe::tryLoadingCredentialsFromSources($node->getContext());
$this->user = $credentials["user"];
$this->password = $credentials["password"];
if ($this->user=="") {
@@ -25,7 +25,7 @@
use Pydio\Access\Core\Model\AJXP_Node;
use Pydio\Access\Driver\StreamProvider\FS\fsAccessWrapper;
-use Pydio\Auth\Core\AJXP_Safe;
+use Pydio\Auth\Core\MemorySafe;
use Pydio\Core\Model\ContextInterface;
use Pydio\Core\Utils\Utils;
@@ -133,7 +133,7 @@ protected static function getSftpResource($context)
'macerror' => "macerrorSftp");
$remote_serv = $repoObject->getContextOption($context, "SERV");
$remote_port = $repoObject->getContextOption($context, "PORT");
- $credentials = AJXP_Safe::tryLoadingCredentialsFromSources($context);
+ $credentials = MemorySafe::tryLoadingCredentialsFromSources($context);
$remote_user = $credentials["user"];
$remote_pass = $credentials["password"];
@@ -322,7 +322,7 @@ public static function getSshConnection(ContextInterface $ctx)
$repoObject = $ctx->getRepository();
$remote_serv = $repoObject->getContextOption($ctx, "SERV");
$remote_port = $repoObject->getContextOption($ctx, "PORT");
- $credentials = AJXP_Safe::tryLoadingCredentialsFromSources($ctx);
+ $credentials = MemorySafe::tryLoadingCredentialsFromSources($ctx);
$remote_user = $credentials["user"];
$remote_pass = $credentials["password"];
$remote_base_path = $repoObject->getContextOption($ctx, "PATH");
@@ -26,7 +26,7 @@
use Pydio\Access\Core\Model\AJXP_Node;
use Pydio\Access\Driver\StreamProvider\FS\fsAccessWrapper;
-use Pydio\Auth\Core\AJXP_Safe;
+use Pydio\Auth\Core\MemorySafe;
use Pydio\Core\Utils\Utils;
use Pydio\Log\Core\AJXP_Logger;
@@ -74,7 +74,7 @@ protected static function initPath($path, $streamType = '', $storeOpenContext =
$host = $repoObject->getContextOption($ctx, "SFTP_HOST");
$port = $repoObject->getContextOption($ctx, "SFTP_PORT");
- $credentials = AJXP_Safe::tryLoadingCredentialsFromSources($node->getContext());
+ $credentials = MemorySafe::tryLoadingCredentialsFromSources($node->getContext());
$user = $credentials["user"];
$pass = $credentials["password"];
@@ -194,7 +194,7 @@ public function detectRemoteUserId($node)
$host = $repoObject->getContextOption($ctx, "SFTP_HOST");
$port = $repoObject->getContextOption($ctx, "SFTP_PORT");
- $credentials = AJXP_Safe::tryLoadingCredentialsFromSources($node->getContext());
+ $credentials = MemorySafe::tryLoadingCredentialsFromSources($node->getContext());
$user = $credentials["user"];
$pass = $credentials["password"];
@@ -23,7 +23,7 @@
use Pydio\Access\Core\Model\AJXP_Node;
use Pydio\Access\Driver\StreamProvider\FS\fsAccessWrapper;
-use Pydio\Auth\Core\AJXP_Safe;
+use Pydio\Auth\Core\MemorySafe;
use Pydio\Core\Utils\Utils;
@@ -71,7 +71,7 @@ protected static function initPath($path, $streamType, $storeOpenContext = false
}
$host = str_replace("//", "", $hostOption);
$credentials = "";
- $safeCreds = AJXP_Safe::tryLoadingCredentialsFromSources($node->getContext());
+ $safeCreds = MemorySafe::tryLoadingCredentialsFromSources($node->getContext());
if ($safeCreds["user"] != "" && $safeCreds["password"] != "") {
$login = $safeCreds["user"];
$pass = $safeCreds["password"];
Oops, something went wrong.

0 comments on commit 7ea41f4

Please sign in to comment.