Class yii\authclient\clients\GoogleOpenId

Inheritanceyii\authclient\clients\GoogleOpenId » yii\authclient\OpenId » yii\authclient\BaseClient » yii\base\Component
Implementsyii\authclient\ClientInterface
Available since version2.0
Deprecated since version2.0.4 because this auth method is no longer supported by Google as of April 20, 2015.

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

Hide inherited properties

PropertyTypeDescriptionDefined By
$authUrl string Authentication base URL, which should be used to compose actual authentication URL by buildAuthUrl() method. yii\authclient\clients\GoogleOpenId
$axToSregMap array Map of matches between AX and SREG attribute names in format: axAttributeName => sregAttributeName yii\authclient\OpenId
$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
$data array Data, which should be used to retrieve the OpenID response. yii\authclient\OpenId
$optionalAttributes array List of attributes, which could be returned from server. yii\authclient\OpenId
$requiredAttributes array List of attributes, which always should be returned from server. yii\authclient\clients\GoogleOpenId
$verifyPeer boolean Whether to verify the peer's certificate. yii\authclient\OpenId

Protected Methods

Hide inherited methods

MethodDescriptionDefined 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 \yii\authclient\clients\normalizeUserAttributeMap value. yii\authclient\clients\GoogleOpenId
defaultReturnUrl() Generates default \yii\authclient\returnUrl value. yii\authclient\OpenId
defaultTitle() Generates service title. yii\authclient\clients\GoogleOpenId
defaultViewOptions() Returns the default \yii\authclient\clients\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 \yii\authclient\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

$authUrl public property

Authentication base URL, which should be used to compose actual authentication URL by buildAuthUrl() method.

public string $authUrl 'https://www.google.com/accounts/o8/id'
$requiredAttributes public property

List of attributes, which always should be returned from server. Attribute names should be always specified in AX format. For example:

['namePerson/friendly', 'contact/email']
public array $requiredAttributes = ['namePerson/first''namePerson/last''contact/email''pref/language']

Method Details

defaultName() protected method

Generates service name.

protected string defaultName ( )
return string

Service name.

defaultNormalizeUserAttributeMap() protected method

Returns the default \yii\authclient\clients\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\clients\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\clients\viewOptions