Default normalize user attribute map added to OpentId clients.

This commit is contained in:
Paul Klimov
2013-12-23 11:18:43 +02:00
parent ba95e1dd12
commit a286f30951
3 changed files with 25 additions and 1 deletions

View File

@@ -203,7 +203,7 @@ trait ClientTrait
* Particular client may override this method in order to provide specific default map. * Particular client may override this method in order to provide specific default map.
* @return array normalize attribute map. * @return array normalize attribute map.
*/ */
public function defaultNormalizeUserAttributeMap() protected function defaultNormalizeUserAttributeMap()
{ {
return []; return [];
} }

View File

@@ -32,6 +32,19 @@ class GoogleOpenId extends OpenId
]; ];
} }
/**
* @inheritdoc
*/
protected function defaultNormalizeUserAttributeMap()
{
return [
'first_name' => 'namePerson/first',
'last_name' => 'namePerson/last',
'email' => 'contact/email',
'language' => 'pref/language',
];
}
/** /**
* @inheritdoc * @inheritdoc
*/ */

View File

@@ -30,6 +30,17 @@ class YandexOpenId extends OpenId
]; ];
} }
/**
* @inheritdoc
*/
protected function defaultNormalizeUserAttributeMap()
{
return [
'name' => 'namePerson',
'email' => 'contact/email',
];
}
/** /**
* @inheritdoc * @inheritdoc
*/ */