Changeset cb39a77
- Timestamp:
- Feb 17, 2019, 4:40:52 PM (8 years ago)
- Branches:
- debian/bullseye, master
- Children:
- 3a89adb
- Parents:
- 74c3571
- Location:
- src/webapp/apigility
- Files:
-
- 3 added
- 3 edited
-
config/modules.config.php (modified) (1 diff)
-
module/Application/src/Authentication/SessionAdapter.php (added)
-
module/Application/src/Authorization/AuthorizationListener.php (added)
-
module/Application/src/Identity/UserIdentity.php (added)
-
module/Application/src/Module.php (modified) (2 diffs)
-
module/gnuboat_mapservice/config/module.config.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/webapp/apigility/config/modules.config.php
r74c3571 rcb39a77 6 6 */ 7 7 return [ 8 'Zend\Session', 8 9 'Zend\\Db', 9 10 'Zend\\Filter', -
src/webapp/apigility/module/Application/src/Module.php
r74c3571 rcb39a77 3 3 * @license http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause 4 4 * @copyright Copyright (c) 2014-2016 Zend Technologies USA Inc. (http://www.zend.com) 5 * 6 * partly copied from https://apigility.org/documentation/auth/user-differentiation 5 7 */ 6 8 7 9 namespace Application; 10 11 use ZF\MvcAuth\Authentication\DefaultAuthenticationListener; 12 use Zend\EventManager\EventInterface; 13 use ZF\MvcAuth\MvcAuthEvent; 8 14 9 15 class Module … … 13 19 return include __DIR__ . '/../config/module.config.php'; 14 20 } 21 22 public function onBootstrap(EventInterface $e) 23 { 24 $app = $e->getApplication(); 25 $container = $app->getServiceManager(); 26 27 // Add Authentication Adapter for session 28 $defaultAuthenticationListener = $container->get(DefaultAuthenticationListener::class); 29 $defaultAuthenticationListener->attach(new Authentication\SessionAdapter()); 30 31 // Add Authorization 32 $eventManager = $app->getEventManager(); 33 $eventManager->attach( 34 MvcAuthEvent::EVENT_AUTHORIZATION, 35 new Authorization\AuthorizationListener(), 36 100 37 ); 38 } 15 39 } -
src/webapp/apigility/module/gnuboat_mapservice/config/module.config.php
r74c3571 rcb39a77 239 239 ], 240 240 'zf-mvc-auth' => [ 241 'authentication' => [ 242 'map' => [ 243 'gnuboat_mapservice\\V1' => 'gnuboat-oauth', 244 'ZF\\OAuth2' => 'session', 245 ], 246 ], 241 247 'authorization' => [ 242 248 'gnuboat_mapservice\\V1\\Rest\\Waters\\Controller' => [ … … 257 263 ], 258 264 ], 265 'session' => [ 266 'adapter' => 'Application\\Authentication\\Adapter\\SessionAdapter', 267 ], 259 268 ], 260 269 ];
Note:
See TracChangeset
for help on using the changeset viewer.
