php database agnostic authentication library for php developers

Overview

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.

Installation

composer require abdyek/whoo "1.0.0-beta4"

Notice!

Whoo uses version 2.0 of Propel. Version 2 is not stable version of Propel. So you must hold "minimum-stability":"beta" in your composer.json until I replace the stable version of Propel instead of the beta version.

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

use Abdyek\Whoo\Controller\SignUp;
use Abdyek\Whoo\Controller\SignIn;
use Abdyek\Whoo\Exception\NotUniqueEmailException;
use Abdyek\Whoo\Exception\IncorrectPasswordException;
use Abdyek\Whoo\Exception\TwoFactorAuthEnabledException;
use Abdyek\Whoo\Exception\InvalidTokenException;
use Abdyek\Whoo\Tool\JWT;

// Whoo once needs to load config
Abdyek\Whoo\Tool\Config::load();

// set secret key of JWT
JWT::setSecretKey('top_secret');
 
// Sign Up
try {
    new SignUp([
        'email'=>'[email protected]',
        'password'=>'this_is_password'
    ]);
    // successfully registered
} catch(NotUniqueEmailException $e) {
    // Oops! the email already is registered
}

// Sign In
try {
    $signIn = new SignIn([
        'email'=>'[email protected]',
        'password'=>'this_is_password'
    ]);
    // You can use $signIn->$jwt you want
} catch(IncorrectPasswordException $e) {
    // Wrong password!
} catch(TwoFactorAuthEnabledException $e) {
    // You can send authentication code to user via any way you want
    // $e->authenticationCode;
}

// JWT Payload
try {
    // $jwt is incoming token from the user
    $payload = JWT::getPayload($jwt);
    $userId = $payload->whoo->userId;
    // userId is a unique number for each user in Whoo user model.
    // You can use it in your application to expand the user model
} catch(InvalidTokenException $e) {
    // Oops!! The token invalid!!   
}

Documentation

You can reach all controller class ant other information at wiki page. You can feedback me about documentation.

Versioning

Whoo will have semantic versioning when first stable release.

You might also like...
Slim Auth is an authorization and authentication library for the Slim Framework.

Slim Auth is an authorization and authentication library for the Slim Framework. Authentication is provided by the Zend Framework Zend\Authentication component, and authorization by the Zend Framework Zend\Permissions\Acl component.

Single file PHP that can serve as a JWT based authentication provider to the PHP-CRUD-API project

Single file PHP that can serve as a JWT based authentication provider to the PHP-CRUD-API project

Multi-provider authentication framework for PHP
Multi-provider authentication framework for PHP

Opauth is a multi-provider authentication framework for PHP, inspired by OmniAuth for Ruby. Opauth enables PHP applications to do user authentication

Simple PHP Google Authentication Template
Simple PHP Google Authentication Template

php-google-auth A php google authentication page project View Demo · Report Problems About The Project This is a small and easy project that I made to

Authentication REST-API built with Lumen PHP Framework

Authentication REST-API built with Lumen PHP Framework Laravel Lumen is a stunningly fast PHP micro-framework for building web applications with expre

This is registration and authentication forms written in PHP, JQuery
This is registration and authentication forms written in PHP, JQuery

Registration-form This is registration and authentication forms written in PHP, JQuery Each file is: header.php - html-file for links "Главная", "Реги

LogRegPHP is a simple authentication module coded in object-oriented PHP.

LogRegPHP is a simple authentication module coded in object-oriented PHP. It provides you with some helper classes to help you get on speed with your project.

PHP class to generate and verify Google Authenticator 2-factor authentication

Google Authenticator PHP class Copyright (c) 2012-2016, http://www.phpgangsta.de Author: Michael Kliewe, @PHPGangsta and contributors Licensed under t

PHPAuth is a secure PHP Authentication class that easily integrates into any site.
PHPAuth is a secure PHP Authentication class that easily integrates into any site.

PHPAuth is under going a complete rewrite to bring the code up to date, the project has been on hold for way to long time now and I decided to work on it again making sure EVERYONE can use it and not just advanced programmers.

Owner
Yunus Emre Bulut
A Student of Computer Science at Suleyman Demirel University - Jr. Developer
Yunus Emre Bulut
A framework agnostic authentication & authorization system.

Sentinel Sentinel is a PHP 7.3+ framework agnostic fully-featured authentication & authorization system. It also provides additional features such as

Cartalyst 1.4k Dec 30, 2022
Vendor-Agnostic Two-Factor Authentication

Multi-Factor Designed to be a vendor-agnostic implementation of various Two-Factor Authentication solutions. Developed by Paragon Initiative Enterpris

Paragon Initiative Enterprises 139 Dec 21, 2022
phpCAS is an authentication library that allows PHP applications to easily authenticate users via a Central Authentication Service (CAS) server.

phpCAS is an authentication library that allows PHP applications to easily authenticate users via a Central Authentication Service (CAS) server.

Apereo Foundation 780 Dec 24, 2022
It's a Laravel 8 authentication markdown that will help you to understand and grasp all the underlying functionality for Session and API Authentication

About Auth Starter It's a Laravel 8 authentication markdown that will help you to understand and grasp all the underlying functionality for Session an

Sami Alateya 10 Aug 3, 2022
PASETO: Platform-Agnostic Security Tokens

PASETO: Platform-Agnostic Security Tokens Paseto is everything you love about JOSE (JWT, JWE, JWS) without any of the many design deficits that plague

Paragon Initiative Enterprises 3.1k Dec 27, 2022
PHP library for Two Factor Authentication (TFA / 2FA)

PHP library for Two Factor Authentication PHP library for two-factor (or multi-factor) authentication using TOTP and QR-codes. Inspired by, based on b

Rob Janssen 896 Dec 30, 2022
Library to manage HTTP authentication with PHP. Includes ServiceProviders for easy Laravel integration.

Intervention HttpAuth Library to manage HTTP authentication with PHP. Includes ServiceProviders for easy Laravel integration. Installation You can ins

null 69 Jul 14, 2022
PHP library for Two Factor Authentication (TFA / 2FA)

PHP library for Two Factor Authentication PHP library for two-factor (or multi-factor) authentication using TOTP and QR-codes. Inspired by, based on b

Rob Janssen 896 Dec 30, 2022
Laravel web rest api authentication library (PHP).

Webi auth library Laravel web rest api authentication library. Install (laravel 9, php 8.1) First set your .env variables (mysql, smtp) and then compo

Atomjoy 2 Nov 25, 2022
Authentication and authorization library for Codeigniter 4

Authentication and Authorization Library for CodeIgniter 4. This library provides an easy and simple way to create login, logout, and user registratio

Rizky Kurniawan 12 Oct 10, 2022