Commit a286f309 by Paul Klimov

Default normalize user attribute map added to OpentId clients.

parent ba95e1dd
......@@ -203,7 +203,7 @@ trait ClientTrait
* Particular client may override this method in order to provide specific default map.
* @return array normalize attribute map.
*/
public function defaultNormalizeUserAttributeMap()
protected function defaultNormalizeUserAttributeMap()
{
return [];
}
......
......@@ -35,6 +35,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
*/
protected function defaultViewOptions()
{
return [
......
......@@ -33,6 +33,17 @@ class YandexOpenId extends OpenId
/**
* @inheritdoc
*/
protected function defaultNormalizeUserAttributeMap()
{
return [
'name' => 'namePerson',
'email' => 'contact/email',
];
}
/**
* @inheritdoc
*/
protected function defaultViewOptions()
{
return [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment