mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 07:23:13 +00:00
Add oauth authentication to permalink route
This commit is contained in:
@@ -14,6 +14,7 @@ namespace Alchemy\Phrasea\ControllerProvider;
|
|||||||
use Alchemy\Phrasea\Application as PhraseaApplication;
|
use Alchemy\Phrasea\Application as PhraseaApplication;
|
||||||
use Alchemy\Phrasea\Controller\LazyLocator;
|
use Alchemy\Phrasea\Controller\LazyLocator;
|
||||||
use Alchemy\Phrasea\Controller\PermalinkController;
|
use Alchemy\Phrasea\Controller\PermalinkController;
|
||||||
|
use Alchemy\Phrasea\Core\Event\Listener\OAuthListener;
|
||||||
use Silex\Application;
|
use Silex\Application;
|
||||||
use Silex\ControllerCollection;
|
use Silex\ControllerCollection;
|
||||||
use Silex\ControllerProviderInterface;
|
use Silex\ControllerProviderInterface;
|
||||||
@@ -69,6 +70,7 @@ class Permalink implements ControllerProviderInterface, ServiceProviderInterface
|
|||||||
->bind('permalinks_permaview_old');
|
->bind('permalinks_permaview_old');
|
||||||
|
|
||||||
$controllers->get('/v1/{sbas_id}/{record_id}/{subdef}/{label}', 'controller.permalink:deliverPermalink')
|
$controllers->get('/v1/{sbas_id}/{record_id}/{subdef}/{label}', 'controller.permalink:deliverPermalink')
|
||||||
|
->before(new OAuthListener(['exit_not_present' => false]))
|
||||||
->bind('permalinks_permalink');
|
->bind('permalinks_permalink');
|
||||||
|
|
||||||
$controllers->match('/v1/{sbas_id}/{record_id}/{subdef}/{label}', 'controller.permalink:getOptionsResponse')
|
$controllers->match('/v1/{sbas_id}/{record_id}/{subdef}/{label}', 'controller.permalink:getOptionsResponse')
|
||||||
|
Reference in New Issue
Block a user