mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-13 20:59:12 +08:00
Default normalize user attribute map added to OpentId clients.
This commit is contained in:
@@ -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 [];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -30,6 +30,17 @@ class YandexOpenId extends OpenId
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritdoc
|
||||||
|
*/
|
||||||
|
protected function defaultNormalizeUserAttributeMap()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'name' => 'namePerson',
|
||||||
|
'email' => 'contact/email',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* @inheritdoc
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user