Class yii\authclient\clients\GoogleOpenId
Inheritance | yii\authclient\clients\GoogleOpenId » yii\authclient\OpenId » yii\authclient\BaseClient » yii\base\Component » yii\base\Object |
---|---|
Implements | yii\authclient\ClientInterface, yii\base\Configurable |
Available since version | 2.0 |
Deprecated since version | 2.0.4 because this auth method is no longer supported by Google as of April 20, 2015. |
Source Code | https://github.com/yiisoft/yii2-authclient/blob/master/clients/GoogleOpenId.php |
GoogleOpenId allows authentication via Google OpenId.
Warning: this class is deprecated since Google is shutting down OpenID protocol support! Use yii\authclient\clients\GoogleOAuth or yii\authclient\clients\GoogleHybrid instead.
Unlike Google OAuth you do not need to register your application anywhere in order to use Google OpenId.
Example application configuration:
'components' => [
'authClientCollection' => [
'class' => 'yii\authclient\Collection',
'clients' => [
'google' => [
'class' => 'yii\authclient\clients\GoogleOpenId'
],
],
]
...
]
Public Properties
Property | Type | Description | Defined By |
---|---|---|---|
$authUrl | yii\authclient\clients\GoogleOpenId | ||
$axToSregMap | array | Map of matches between AX and SREG attribute names in format: axAttributeName => sregAttributeName | yii\authclient\OpenId |
$behaviors | yii\base\Behavior[] | List of behaviors attached to this component | yii\base\Component |
$cainfo | string | The name of a file holding one or more certificates to verify the peer with. | yii\authclient\OpenId |
$capath | string | Directory that holds multiple CA certificates. | yii\authclient\OpenId |
$claimedId | string | Claimed identifier (identity). | yii\authclient\OpenId |
$data | array | Data, which should be used to retrieve the OpenID response. | yii\authclient\OpenId |
$id | string | Service id. | yii\authclient\BaseClient |
$name | string | Service name. | yii\authclient\BaseClient |
$normalizeUserAttributeMap | array | Normalize user attribute map. | yii\authclient\BaseClient |
$optionalAttributes | array | List of attributes, which could be returned from server. | yii\authclient\OpenId |
$requiredAttributes | yii\authclient\clients\GoogleOpenId | ||
$returnUrl | string | Authentication return URL. | yii\authclient\OpenId |
$title | string | Service title. | yii\authclient\BaseClient |
$trustRoot | string | Client trust root (realm). | yii\authclient\OpenId |
$userAttributes | array | List of user attributes | yii\authclient\BaseClient |
$verifyPeer | boolean | Whether to verify the peer's certificate. | yii\authclient\OpenId |
$viewOptions | array | View options in format: optionName => optionValue | yii\authclient\BaseClient |
Public Methods
Method | Description | Defined By |
---|---|---|
__call() | Calls the named method which is not a class method. | yii\base\Component |
__clone() | This method is called after the object is created by cloning an existing one. | yii\base\Component |
__construct() | Constructor. | yii\base\Object |
__get() | Returns the value of a component property. | yii\base\Component |
__isset() | Checks if a property is set, i.e. defined and not null. | yii\base\Component |
__set() | Sets the value of a component property. | yii\base\Component |
__unset() | Sets a component property to be null. | yii\base\Component |
attachBehavior() | Attaches a behavior to this component. | yii\base\Component |
attachBehaviors() | Attaches a list of behaviors to the component. | yii\base\Component |
behaviors() | Returns a list of behaviors that this component should behave as. | yii\base\Component |
buildAuthUrl() | Returns authentication URL. Usually, you want to redirect your user to it. | yii\authclient\OpenId |
canGetProperty() | Returns a value indicating whether a property can be read. | yii\base\Component |
canSetProperty() | Returns a value indicating whether a property can be set. | yii\base\Component |
className() | Returns the fully qualified name of this class. | yii\base\Object |
detachBehavior() | Detaches a behavior from the component. | yii\base\Component |
detachBehaviors() | Detaches all behaviors from the component. | yii\base\Component |
discover() | Performs Yadis and HTML discovery. | yii\authclient\OpenId |
ensureBehaviors() | Makes sure that the behaviors declared in behaviors() are attached to this component. | yii\base\Component |
fetchAttributes() | Gets AX/SREG attributes provided by OP. Should be used only after successful validation. | yii\authclient\OpenId |
getBehavior() | Returns the named behavior object. | yii\base\Component |
getBehaviors() | Returns all behaviors attached to this component. | yii\base\Component |
getClaimedId() | yii\authclient\OpenId | |
getId() | yii\authclient\BaseClient | |
getName() | yii\authclient\BaseClient | |
getNormalizeUserAttributeMap() | yii\authclient\BaseClient | |
getReturnUrl() | yii\authclient\OpenId | |
getTitle() | yii\authclient\BaseClient | |
getTrustRoot() | yii\authclient\OpenId | |
getUserAttributes() | yii\authclient\BaseClient | |
getViewOptions() | yii\authclient\BaseClient | |
hasEventHandlers() | Returns a value indicating whether there is any handler attached to the named event. | yii\base\Component |
hasMethod() | Returns a value indicating whether a method is defined. | yii\base\Component |
hasProperty() | Returns a value indicating whether a property is defined for this component. | yii\base\Component |
hostExists() | Checks if the server specified in the url exists. | yii\authclient\OpenId |
init() | Initializes the object. | yii\authclient\OpenId |
off() | Detaches an existing event handler from this component. | yii\base\Component |
on() | Attaches an event handler to an event. | yii\base\Component |
setClaimedId() | yii\authclient\OpenId | |
setId() | yii\authclient\BaseClient | |
setName() | yii\authclient\BaseClient | |
setNormalizeUserAttributeMap() | yii\authclient\BaseClient | |
setReturnUrl() | yii\authclient\OpenId | |
setTitle() | yii\authclient\BaseClient | |
setTrustRoot() | yii\authclient\OpenId | |
setUserAttributes() | yii\authclient\BaseClient | |
setViewOptions() | yii\authclient\BaseClient | |
trigger() | Triggers an event. | yii\base\Component |
validate() | Performs OpenID verification with the OP. | yii\authclient\OpenId |
Protected Methods
Method | Description | Defined By |
---|---|---|
buildAuthUrlV1() | Builds authentication URL for the protocol version 1. | yii\authclient\OpenId |
buildAuthUrlV2() | Builds authentication URL for the protocol version 2. | yii\authclient\OpenId |
buildAxParams() | Composes AX request parameters. | yii\authclient\OpenId |
buildSregParams() | Composes SREG request parameters. | yii\authclient\OpenId |
buildUrl() | Combines given URLs into single one. | yii\authclient\OpenId |
compareUrl() | Compares 2 URLs taking in account possible GET parameters order miss match and URL encoding inconsistencies. | yii\authclient\OpenId |
defaultName() | Generates service name. | yii\authclient\clients\GoogleOpenId |
defaultNormalizeUserAttributeMap() | Returns the default $normalizeUserAttributeMap value. | yii\authclient\clients\GoogleOpenId |
defaultReturnUrl() | Generates default $returnUrl value. | yii\authclient\OpenId |
defaultTitle() | Generates service title. | yii\authclient\clients\GoogleOpenId |
defaultViewOptions() | Returns the default $viewOptions value. | yii\authclient\clients\GoogleOpenId |
extractHtmlTagValue() | Scans content for / tags and extract information from them. | yii\authclient\OpenId |
fetchAxAttributes() | Gets AX attributes provided by OP. | yii\authclient\OpenId |
fetchSregAttributes() | Gets SREG attributes provided by OP. SREG names will be mapped to AX names. | yii\authclient\OpenId |
initUserAttributes() | Initializes authenticated user attributes. | yii\authclient\OpenId |
normalizeUserAttributes() | Normalize given user attributes according to $normalizeUserAttributeMap. | yii\authclient\BaseClient |
sendRequest() | Sends request to the server | yii\authclient\OpenId |
validateRequiredAttributes() | Checks if all required attributes are present in the server response. | yii\authclient\OpenId |
Property Details
Method Details
Generates service name.
string defaultName( ) | ||
return | string | Service name. |
---|
Returns the default $normalizeUserAttributeMap value.
Particular client may override this method in order to provide specific default map.
array defaultNormalizeUserAttributeMap( ) | ||
return | array | Normalize attribute map. |
---|
Generates service title.
string defaultTitle( ) | ||
return | string | Service title. |
---|
Returns the default $viewOptions value.
Particular client may override this method in order to provide specific default view options.
array defaultViewOptions( ) | ||
return | array | List of default $viewOptions |
---|