guardianphp/guardian

Simple and flexible authentication framework

dev-master / 0.1.x-dev 2015-06-19 02:28 UTC

This package is not auto-updated.

Last update: 2020-09-18 20:42:33 UTC


README

Latest Version Software License Total Downloads

Simple and flexible authentication framework.

Install

Via Composer

$ composer require guardianphp/guardian

Usage

This library provides an easy way to authenticate any entity with OR without persisting and calling it "login".

For persistent login example check guardian/session.

Basic usage

// Subject: the entity being authenticated (can be anything based on the identifier, mostly an array)
// Identifier: identifies the subject and returns a caller object (implements Guardian\Identifier)
// Caller: implements Guardian\Caller
$caller = $identifier->identify($subject);

// Authenticator: implements Guardian\Authenticator
// Returns true or false
$authenticator->authenticate($subject, $caller);

Security

If you discover any security related issues, please contact us at security@guardianphp.org.

Credits

License

The MIT License (MIT). Please see License File for more information.