Abstract Class yii\authclient\BaseClient

Inheritanceyii\authclient\BaseClient » yii\base\Component
Implementsyii\authclient\ClientInterface
Subclassesyii\authclient\BaseOAuth, yii\authclient\OAuth1, yii\authclient\OAuth2, yii\authclient\OpenId, yii\authclient\clients\Facebook, yii\authclient\clients\GitHub, yii\authclient\clients\GoogleHybrid, yii\authclient\clients\GoogleOAuth, yii\authclient\clients\GoogleOpenId, yii\authclient\clients\LinkedIn, yii\authclient\clients\Live, yii\authclient\clients\Twitter, yii\authclient\clients\VKontakte, yii\authclient\clients\YandexOAuth, yii\authclient\clients\YandexOpenId
Available since version2.0

BaseClient is a base Auth Client class.

See also yii\authclient\ClientInterface.

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
defaultName() Generates service name. yii\authclient\BaseClient
defaultNormalizeUserAttributeMap() Returns the default \yii\authclient\normalizeUserAttributeMap value. yii\authclient\BaseClient
defaultTitle() Generates service title. yii\authclient\BaseClient
defaultViewOptions() Returns the default \yii\authclient\viewOptions value. yii\authclient\BaseClient
initUserAttributes() Initializes authenticated user attributes. yii\authclient\BaseClient
normalizeUserAttributes() Normalize given user attributes according to \yii\authclient\normalizeUserAttributeMap. yii\authclient\BaseClient

Method Details

defaultName() protected method

Generates service name.

protected string defaultName ( )
return string

Service name.

defaultNormalizeUserAttributeMap() protected method

Returns the default \yii\authclient\normalizeUserAttributeMap value.

Particular client may override this method in order to provide specific default map.

protected array defaultNormalizeUserAttributeMap ( )
return array

Normalize attribute map.

defaultTitle() protected method

Generates service title.

protected string defaultTitle ( )
return string

Service title.

defaultViewOptions() protected method

Returns the default \yii\authclient\viewOptions value.

Particular client may override this method in order to provide specific default view options.

protected array defaultViewOptions ( )
return array

List of default \yii\authclient\viewOptions

getId() public method

public string getId ( )
return string

Service id

getName() public method

public string getName ( )
return string

Service name.

getNormalizeUserAttributeMap() public method

public array getNormalizeUserAttributeMap ( )
return array

Normalize user attribute map.

getTitle() public method

public string getTitle ( )
return string

Service title.

getUserAttributes() public method

public array getUserAttributes ( )
return array

List of user attributes

getViewOptions() public method

public array getViewOptions ( )
return array

View options in format: optionName => optionValue

initUserAttributes() protected method

Initializes authenticated user attributes.

protected array initUserAttributes ( )
return array

Auth user attributes.

normalizeUserAttributes() protected method

Normalize given user attributes according to \yii\authclient\normalizeUserAttributeMap.

protected array normalizeUserAttributes ( $attributes )
$attributes array

Raw attributes.

return array

Normalized attributes.

throws \yii\base\InvalidConfigException

on incorrect normalize attribute map.

setId() public method

public void setId ( $id )
$id string

Service id.

setName() public method

public void setName ( $name )
$name string

Service name.

setNormalizeUserAttributeMap() public method

public void setNormalizeUserAttributeMap ( $normalizeUserAttributeMap )
$normalizeUserAttributeMap array

Normalize user attribute map.

setTitle() public method

public void setTitle ( $title )
$title string

Service title.

setUserAttributes() public method

public void setUserAttributes ( $userAttributes )
$userAttributes array

List of user attributes

setViewOptions() public method

public void setViewOptions ( $viewOptions )
$viewOptions array

View options in format: optionName => optionValue