worteks/yii2auth-oidc

OIDC connector for yii2-authclient

0.2 2020-01-10 11:21 UTC

This package is auto-updated.

Last update: 2024-12-10 22:01:03 UTC


README

This extension adds OIDC support for yii2-authclient.

Latest Stable Version Total Downloads Monthly Downloads License

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require worteks/yii2auth-oidc

or add

"worteks/yii2auth-oidc": "~0.2"

to the require section of your composer.json.

Usage

You must read the yii2-authclient docs

Set up an OpenID Provider (OP) and configure your Yii2 app as a Relying Party (RP) on your Authentication Server.

Example application configuration:

'components' => [
   'authClientCollection' => [
     'clients' => [
        // ...
        'oidc' => [
          'class' => 'worteks\yii\authclient\OIDC',
          'domain' => 'https://auth.example.com',
          'clientId' => 'myClientId',
          'clientSecret' => 'myClientSecret',
        ],
     ],
    // ...
]