Blame view

common/components/nodge/eauth/src/services/YahooOpenIDService.php 1.15 KB
b0f143c3   Yarik   first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
  <?php
  /**
   * YahooOpenIDService class file.
   *
   * @author Maxim Zemskov <nodge@yandex.ru>
   * @link http://github.com/Nodge/yii2-eauth/
   * @license http://www.opensource.org/licenses/bsd-license.php
   */
  
  namespace common\components\nodge\eauth\src\services;
  
  use nodge\eauth\openid\Service;
  
  /**
   * Yahoo provider class.
   *
   * @package application.extensions.eauth.services
   */
  class YahooOpenIDService extends Service
  {
  
  	protected $name = 'yahoo';
  	protected $title = 'Yahoo';
  	protected $type = 'OpenID';
  	protected $jsArguments = ['popup' => ['width' => 880, 'height' => 520]];
  
  	protected $url = 'https://me.yahoo.com';
  	protected $requiredAttributes = [
  		'name' => ['fullname', 'namePerson'],
  		'login' => ['nickname', 'namePerson/friendly'],
  		'email' => ['email', 'contact/email'],
  	];
  	protected $optionalAttributes = [
  		'language' => ['language', 'pref/language'],
  		'gender' => ['gender', 'person/gender'],
  		'timezone' => ['timezone', 'pref/timezone'],
  		'image' => ['image', 'media/image/default'],
  	];
  
  	/*protected function fetchAttributes() {
  		$this->attributes['fullname'] = $this->attributes['name'].' '.$this->attributes['lastname'];
  		return true;
  	}*/
  }