https://github.com/abdyek/whoo
php database agnostic authentication library for your php application
https://github.com/abdyek/whoo
authentication jwt two-factor-authentication
Last synced: 14 days ago
JSON representation
php database agnostic authentication library for your php application
- Host: GitHub
- URL: https://github.com/abdyek/whoo
- Owner: abdyek
- License: mit
- Created: 2021-07-15T18:20:44.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-01-15T18:50:36.000Z (about 4 years ago)
- Last Synced: 2024-12-22T18:29:49.455Z (about 1 year ago)
- Topics: authentication, jwt, two-factor-authentication
- Language: PHP
- Homepage:
- Size: 601 KB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Whoo
Whoo is a database agnostic authentication library to manage authentication operation easily. Whoo provides you a layer to access and manage user and authentication in your application using [Propel ORM](https://github.com/propelorm/Propel2).
## Installation
`composer require propel/propel "2.0.0-beta1" abdyek/whoo ^1.0`
## Features
* Easy installation, building, usage and learning
* Two-Factor Authentication support
* OAuth2 authentication provider support
* Database agnostic. MySQL, MS SQL Server, PostgreSQL, SQLite, Oracle support (powered by Propel ORM)
* Able to configure for you application
* Portable and standalone
* Destroyable JSON Web Tokens
## Getting Started
```php
require 'vendor/autoload.php';
use Abdyek\Whoo\Whoo;
// Whoo once needs to load Propel config
Whoo::loadPropelConfig();
// Sign Up
$signUp = new Whoo('SignUp', [
'email' => 'new_user_email@example.com',
'password' => 'this_is_password',
'username' => 'abdyek',
]);
$signUp->success(function(array $response) {
echo $response['user']->getUsername() . ' registered whoo database';
})->exception('NotUniqueEmail', function($e) {
// Oops! the email already is registered
})->exception('NotUniqueUsername', function($e) {
// Oops! the username already is registered
});
$signUp->run();
```
## Documentation
You can reach all controller class and other info at [wiki](https://github.com/abdyek/whoo/wiki) page.
## Versioning
Whoo will have semantic versioning when first stable release.