Skip to content
Snippets Groups Projects
Select Git revision
  • f1469c6034fcf8d32901f72b4cbec20e59c25d0b
  • main default protected
  • register-logging-channel
  • expr-lang
  • ci-82
  • attr-events
  • locale-wip
  • custom-routes
  • v0.1.85
  • v0.1.84
  • v0.1.83
  • v0.1.82
  • v0.1.81
  • v0.1.80
  • v0.1.79
  • v0.1.78
  • v0.1.77
  • v0.1.76
  • v0.1.75
  • v0.1.74
  • v0.1.73
  • v0.1.72
  • v0.1.71
  • v0.1.70
  • v0.1.69
  • v0.1.68
  • v0.1.67
  • v0.1.65
28 results

UserSessionInterface.php

Blame
    • Reiter, Christoph's avatar
      7430fbcf
      Move the user session into the core · 7430fbcf
      Reiter, Christoph authored
      and remove roles and oidc specifics. Instead we provide the session
      in the core and forward requests to a oidc specific backend.
      
      This also means the session can provide useful values even in case
      it is used from the CLI and unauthenticated.
      7430fbcf
      History
      Move the user session into the core
      Reiter, Christoph authored
      and remove roles and oidc specifics. Instead we provide the session
      in the core and forward requests to a oidc specific backend.
      
      This also means the session can provide useful values even in case
      it is used from the CLI and unauthenticated.
    PersonForExternalServiceSubscriber.php 910 B
    <?php
    
    declare(strict_types=1);
    
    namespace Dbp\Relay\BasePersonConnectorLdapBundle\TestUtils;
    
    use Dbp\Relay\BasePersonBundle\Entity\Person;
    use Dbp\Relay\BasePersonConnectorLdapBundle\Event\PersonForExternalServiceEvent;
    use Symfony\Component\EventDispatcher\EventSubscriberInterface;
    
    class PersonForExternalServiceSubscriber implements EventSubscriberInterface
    {
        public static function getSubscribedEvents(): array
        {
            return [
                PersonForExternalServiceEvent::NAME => 'onEvent',
            ];
        }
    
        public function onEvent(PersonForExternalServiceEvent $event)
        {
            $service = $event->getService();
            $serviceID = $event->getServiceID();
    
            if ($service === 'test-service') {
                $person = new Person();
                $person->setExtraData('test-service', 'my-test-service-string-'.$serviceID);
                $event->setPerson($person);
            }
        }
    }