/** * @param Container $pimple A container instance */ public function register(Container $pimple) { $pimple[StoreContainer::REQUEST_STATE_STORE] = function () { return new RequestStateSessionStore($this->systemContainer->getSession(), 'main'); }; $pimple[StoreContainer::ID_STATE_STORE] = function () { return new NullIdStore(); }; $pimple[StoreContainer::SSO_STATE_STORE] = function () { return new SsoStateSessionStore($this->systemContainer->getSession(), 'samlsso'); }; }
/** * @param Container $pimple A container instance */ public function register(Container $pimple) { $pimple[ServiceContainer::NAME_ID_VALIDATOR] = function () { return new NameIdValidator(); }; $pimple[ServiceContainer::ASSERTION_TIME_VALIDATOR] = function () { return new AssertionTimeValidator(); }; $pimple[ServiceContainer::ASSERTION_VALIDATOR] = function (Container $c) { $nameIdValidator = $c[ServiceContainer::NAME_ID_VALIDATOR]; return new AssertionValidator($nameIdValidator, new SubjectValidator($nameIdValidator), new StatementValidator()); }; $pimple[ServiceContainer::ENDPOINT_RESOLVER] = function () { return new CompositeEndpointResolver(array(new BindingEndpointResolver(), new DescriptorTypeEndpointResolver(), new ServiceTypeEndpointResolver(), new IndexEndpointResolver(), new LocationEndpointResolver())); }; $pimple[ServiceContainer::BINDING_FACTORY] = function () { return new BindingFactory($this->systemContainer->getEventDispatcher()); }; $pimple[ServiceContainer::CREDENTIAL_RESOLVER] = function () { $factory = new CredentialResolverFactory($this->credentialContainer->getCredentialStore()); return $factory->build(); }; $pimple[ServiceContainer::SIGNATURE_RESOLVER] = function (Container $c) { $credentialResolver = $c[ServiceContainer::CREDENTIAL_RESOLVER]; return new OwnSignatureResolver($credentialResolver); }; $pimple[ServiceContainer::SIGNATURE_VALIDATOR] = function (Container $c) { $credentialResolver = $c[ServiceContainer::CREDENTIAL_RESOLVER]; return new SignatureValidator($credentialResolver); }; $pimple[ServiceContainer::LOGOUT_SESSION_RESOLVER] = function () { return new LogoutSessionResolver($this->storeContainer->getSsoStateStore()); }; $pimple[ServiceContainer::SESSION_PROCESSOR] = function () { return new SessionProcessor($this->storeContainer->getSsoStateStore(), $this->systemContainer->getTimeProvider()); }; }