https://github.com/phauthentic/authentication-yii
Yii integration for the Authentication library
https://github.com/phauthentic/authentication-yii
adapter authentication library yii yii2
Last synced: 4 months ago
JSON representation
Yii integration for the Authentication library
- Host: GitHub
- URL: https://github.com/phauthentic/authentication-yii
- Owner: Phauthentic
- License: mit
- Created: 2018-09-12T14:30:01.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-09-18T12:38:10.000Z (almost 7 years ago)
- Last Synced: 2025-01-02T23:48:14.074Z (6 months ago)
- Topics: adapter, authentication, library, yii, yii2
- Language: PHP
- Homepage:
- Size: 11.7 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Yii Authentication Bridge
[](LICENSE)
[](https://scrutinizer-ci.com/g/Phauthentic/authentication-yii/)
[](https://scrutinizer-ci.com/g/Phauthentic/authentication-yii/)This package will allow you to lookup user credentials with your Yii application using the [Phautentic Authentication](https://github.com/Phauthentic/authentication) library.
## How to use it
Install it via composer.
```sh
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.
```php
$model = new Users();
$resolver = new YiiResolver($model);
```You can pass a connection as well if you need to:
```php
$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](https://github.com/Phauthentic/authentication).
## Copyright & License
Licensed under the [MIT license](LICENSE.txt).
Copyright (c) [Phauthentic](https://github.com/Phauthentic/authentication)