Unverified Commit fd212c2a authored by Thomas Müller's avatar Thomas Müller
Browse files

Allow registration of federated auth

parent a70222c7
...@@ -75,17 +75,16 @@ class Server { ...@@ -75,17 +75,16 @@ class Server {
$this->server->setBaseUri($this->baseUri); $this->server->setBaseUri($this->baseUri);
$this->server->addPlugin(new BlockLegacyClientPlugin(\OC::$server->getConfig())); $this->server->addPlugin(new BlockLegacyClientPlugin(\OC::$server->getConfig()));
$authPlugin = new Plugin();
$authPlugin->addBackend(new PublicAuth());
$this->server->addPlugin($authPlugin);
// allow setup of additional auth backends // allow setup of additional auth backends
$event = new SabrePluginEvent($this->server); $event = new SabrePluginEvent($this->server);
$dispatcher->dispatch('OCA\DAV\Connector\Sabre::authInit', $event); $dispatcher->dispatch('OCA\DAV\Connector\Sabre::authInit', $event);
// because we are throwing exceptions this plugin has to be the last one // because we are throwing exceptions this plugin has to be the last one
$authPlugin = new Plugin();
$authPlugin->addBackend($authBackend); $authPlugin->addBackend($authBackend);
$authPlugin->addBackend(new PublicAuth());
$this->server->addPlugin($authPlugin);
// debugging // debugging
if(\OC::$server->getConfig()->getSystemValue('debug', false)) { if(\OC::$server->getConfig()->getSystemValue('debug', false)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment