/authentication-yii

Yii integration for the Authentication library

Primary LanguagePHPMIT LicenseMIT

Yii Authentication Bridge

Software License Scrutinizer Coverage Code Quality

This package will allow you to lookup user credentials with your Yii application using the Phautentic Authentication library.

How to use it

Install it via composer.

composer require phauthentic/authentication-yii

Using the Yii2 model resolver

All you need to do is to instantiate a model object and pass it to the resolver.

$model = new Users();
$resolver = new YiiResolver($model);

You can pass a connection as well if you need to:

$model = new Users();
$connection = Yii::$app->getDb();
$resolver = new YiiResolver($model, $connection);

For further information on how to configure identifiers and resolvers please check the documentation of Phautentic Authentication.

Copyright & License

Licensed under the MIT license.

Copyright (c) Phauthentic