Abstract Class yii\authclient\BaseClient
BaseClient is a base Auth Client class.
See also yii\authclient\ClientInterface.
Public Methods
Protected Methods
Method | Description | Defined 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
Generates service name.
protected string defaultName ( ) | ||
return | string | Service name. |
---|
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. |
---|
Generates service title.
protected string defaultTitle ( ) | ||
return | string | Service title. |
---|
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 |
---|
public string getId ( ) | ||
return | string | Service id |
---|
public string getName ( ) | ||
return | string | Service name. |
---|
public array getNormalizeUserAttributeMap ( ) | ||
return | array | Normalize user attribute map. |
---|
public string getTitle ( ) | ||
return | string | Service title. |
---|
public array getUserAttributes ( ) | ||
return | array | List of user attributes |
---|
public array getViewOptions ( ) | ||
return | array | View options in format: optionName => optionValue |
---|
Initializes authenticated user attributes.
protected array initUserAttributes ( ) | ||
return | array | Auth user attributes. |
---|
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. |
public void setId ( $id ) | ||
$id | string | Service id. |
public void setName ( $name ) | ||
$name | string | Service name. |
public void setNormalizeUserAttributeMap ( $normalizeUserAttributeMap ) | ||
$normalizeUserAttributeMap | array | Normalize user attribute map. |
public void setTitle ( $title ) | ||
$title | string | Service title. |
public void setUserAttributes ( $userAttributes ) | ||
$userAttributes | array | List of user attributes |
public void setViewOptions ( $viewOptions ) | ||
$viewOptions | array | View options in format: optionName => optionValue |