AuthClient Extension for Yii 2
This extension adds OpenID, OAuth, OAuth2 and OpenId Connect consumers for the Yii framework 2.0.
For license information check the LICENSE-file.
Documentation is at docs/guide/README.md.
For applications with one provider, see direct provider login.
Installation ¶
[!IMPORTANT]
- The minimum required PHP version is PHP
7.4.- It works best with PHP
8.
The preferred way to install this extension is through composer.
Either run
composer require --prefer-dist yiisoft/yii2-authclient
or add
"yiisoft/yii2-authclient": "~2.2.0"
to the require section of your composer.json.
Class Reference
| Class | Description |
|---|---|
| yii\ |
AuthAction performs authentication via different auth clients. |
| yii\ |
BaseClient is a base Auth Client class. |
| yii\ |
BaseOAuth is a base class for the OAuth clients. |
| yii\ |
CacheStateStorage provides Auth client state storage based in cache component. |
| yii\ |
ClientErrorResponseException represents an exception caused by a "client error" server response status code (4xx). |
| yii\ |
ClientInterface declares basic interface all Auth clients should follow. |
| yii\ |
Collection is a storage for all auth clients in the application. |
| yii\ |
InvalidResponseException represents an exception caused by a non-successful server response status code. |
| yii\ |
OAuth1 serves as a client for the OAuth 1/1.0a flow. |
| yii\ |
OAuth2 serves as a client for the OAuth 2 flow. |
| yii\ |
Token represents OAuth token. |
| yii\ |
OpenId provides a simple interface for OpenID (1.1 and 2.0) authentication. |
| yii\ |
OpenIdConnect serves as a client for the OpenIdConnect flow. |
| yii\ |
SessionStateStorage provides Auth client state storage based on web session. |
| yii\ |
StateStorageInterface is an interface for Auth client state storage. |
| yii\ |
Facebook allows authentication via Facebook OAuth. |
| yii\ |
GitHub allows authentication via GitHub OAuth. |
| yii\ |
Google allows authentication via Google OAuth. |
| yii\ |
GoogleHybrid is an enhanced version of the yii\ |
| yii\ |
LinkedIn allows authentication via LinkedIn OAuth. |
| yii\ |
Live allows authentication via Microsoft Live OAuth. |
| yii\ |
Generic client that allows authentication via OAuth 2.0. |
| yii\ |
Twitter allows authentication via Twitter OAuth. |
| yii\ |
TwitterOAuth2 allows authentication via Twitter OAuth 2. |
| yii\ |
VKontakte allows authentication via VKontakte OAuth. |
| yii\ |
Yandex allows authentication via Yandex OAuth. |
| yii\ |
BaseMethod is a base class for the OAuth signature methods. |
| yii\ |
HmacSha1 represents 'HMAC SHA' signature method. |
| yii\ |
|
| yii\ |
PlainText represents 'PLAINTEXT' signature method. |
| yii\ |
RsaSha1 represents 'SHAwithRSA' (also known as RSASSA-PKCS1-V1_5-SIGN with the SHA hash) signature method. |
| yii\ |
|
| yii\ |
AuthChoice prints buttons for authentication via various auth clients. |
| yii\ |
AuthChoiceAsset is an asset bundle for yii\ |
| yii\ |
AuthChoiceItem is a base class for creating widgets, which can be used to render link
for auth client at yii\ |
| yii\ |
AuthChoiceAsset is an asset bundle for yii\ |
| yii\ |
GooglePlusButton renders Google+ sign-in button. |

