/**
  * @return UserMapping
  * @throws UserMappingNotFoundException
  */
 public function getByProviderAndIdentifier(Provider $provider, $identifier)
 {
     $row = $this->dao->searchByIdentifierAndProviderId($identifier, $provider->getId());
     if ($row === false) {
         throw new UserMappingNotFoundException();
     }
     return $this->instantiateFromRow($row);
 }
示例#2
0
 /**
  * @return array
  */
 private function generateConfiguration(Provider $provider)
 {
     return array('client_info' => array('client_id' => $provider->getClientId(), 'redirect_uri' => $this->getRedirectUri(), 'authorization_endpoint' => $provider->getAuthorizationEndpoint(), 'token_endpoint' => $provider->getTokenEndpoint(), 'user_info_endpoint' => $provider->getUserInfoEndpoint(), 'authentication_info' => array('method' => 'client_secret_post', 'params' => array('client_secret' => $provider->getClientSecret()))), 'token_dispatcher' => array('http_options' => array('headers' => array('Accept' => 'application/json'))));
 }