Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 24 days 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 (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-09-18T12:38:10.000Z (over 6 years ago)
- Last Synced: 2024-11-09T03:37:26.994Z (3 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
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)
[![Scrutinizer Coverage](https://img.shields.io/scrutinizer/coverage/g/Phauthentic/authentication-yii/master.svg?style=flat-square)](https://scrutinizer-ci.com/g/Phauthentic/authentication-yii/)
[![Code Quality](https://img.shields.io/scrutinizer/g/Phauthentic/authentication-yii/master.svg?style=flat-square)](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)