nextcloud/apps/files_external/lib
Robin McCorkell 272a46ebe1 Authentication mechanisms for external storage backends
A backend can now specify generic authentication schemes that it
supports, instead of specifying the parameters for its authentication
method directly. This allows multiple authentication mechanisms to be
implemented for a single scheme, providing altered functionality.

This commit introduces the backend framework for this feature, and so at
this point the UI will be broken as the frontend does not specify the
required information.

Terminology:
 - authentication scheme
    Parameter interface for the authentication method. A backend
    supporting the 'password' scheme accepts two parameters, 'user' and
    'password'.
 - authentication mechanism
    Specific mechanism implementing a scheme. Basic mechanisms may
    forward configuration options directly to the backend, more advanced
    ones may lookup parameters or retrieve them from the session

New dropdown selector for external storage configurations to select the
authentication mechanism to be used.

Authentication mechanisms can have visibilities, just like backends.
The API was extended too to make it easier to add/remove visibilities.
In addition, the concept of 'allowed visibility' has been introduced, so
a backend/auth mechanism can force a maximum visibility level (e.g.
Local storage type) that cannot be overridden by configuration in the
web UI.

An authentication mechanism is a fully instantiated implementation. This
allows an implementation to have dependencies injected into it, e.g. an
\OCP\IDB for database operations.

When a StorageConfig is being prepared for mounting, the authentication
mechanism implementation has manipulateStorage() called,
which inserts the relevant authentication method options into the
storage ready for mounting.
2015-08-19 10:05:11 +01:00
..
auth Authentication mechanisms for external storage backends 2015-08-19 10:05:11 +01:00
backend Authentication mechanisms for external storage backends 2015-08-19 10:05:11 +01:00
config Authentication mechanisms for external storage backends 2015-08-19 10:05:11 +01:00
amazons3.php Use the new IteratorDirectory instead of the fakedir wrapper 2015-07-15 13:57:53 +02:00
api.php Revert "Use OCP classes as much as possible in files_external" 2015-07-02 13:00:21 +02:00
config.php Authentication mechanisms for external storage backends 2015-08-19 10:05:11 +01:00
definitionparameter.php Introduce BackendService for managing external storage backends 2015-08-19 10:05:11 +01:00
dependencytrait.php Introduce BackendService for managing external storage backends 2015-08-19 10:05:11 +01:00
dropbox.php Use the new IteratorDirectory instead of the fakedir wrapper 2015-07-15 13:57:53 +02:00
etagpropagator.php Update license headers 2015-03-26 11:44:36 +01:00
frontenddefinitiontrait.php Introduce BackendService for managing external storage backends 2015-08-19 10:05:11 +01:00
ftp.php Update license headers 2015-03-26 11:44:36 +01:00
google.php Use the new IteratorDirectory instead of the fakedir wrapper 2015-07-15 13:57:53 +02:00
missingdependency.php Introduce BackendService for managing external storage backends 2015-08-19 10:05:11 +01:00
notfoundexception.php Update license headers 2015-03-26 11:44:36 +01:00
owncloud.php Update license headers 2015-03-26 11:44:36 +01:00
personalmount.php Introduce BackendService for managing external storage backends 2015-08-19 10:05:11 +01:00
prioritytrait.php Introduce BackendService for managing external storage backends 2015-08-19 10:05:11 +01:00
sftp.php Merge pull request #14779 from owncloud/use-iterator-directory 2015-08-07 22:16:47 +01:00
sftp_key.php Use absolute namespace 2015-08-05 10:30:39 +02:00
smb.php Double slash for SMB storage id for compatibility 2015-07-28 11:41:54 +02:00
smb_oc.php update license headers and authors 2015-06-25 14:13:49 +02:00
storageconfig.php Authentication mechanisms for external storage backends 2015-08-19 10:05:11 +01:00
storagemodifiertrait.php Authentication mechanisms for external storage backends 2015-08-19 10:05:11 +01:00
streamwrapper.php handle rmdir on files for ftp storages 2015-07-16 15:44:10 +02:00
swift.php Use the new IteratorDirectory instead of the fakedir wrapper 2015-07-15 13:57:53 +02:00
visibilitytrait.php Authentication mechanisms for external storage backends 2015-08-19 10:05:11 +01:00