Skip to content

Instantly share code, notes, and snippets.

@davidwindell
Created July 5, 2012 14:18
Show Gist options
  • Save davidwindell/3053936 to your computer and use it in GitHub Desktop.
Save davidwindell/3053936 to your computer and use it in GitHub Desktop.
<?php
public function getServiceConfiguration() {
return array(
'factories' => array(
'my_identity_provider' => function($sm) {
$identity = $sm->get('Zend\Authentication\AuthenticationService')->getIdentity();
return $identity ? $identity : Entity\Contact::ROLE_GUEST;
},
),
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment