Declarative style of authorization and validation in laravel.

Overview

Laravel Hey Man

Readability Counts. In fact, Readability is the primary value of your code !!!

Quality Score code coverage Maintainability Build Status StyleCI Latest Stable Version Daily Downloads Total Downloads Awesome Laravel Software License

🎀 Heyman continues where the other role-permission packages left off...

We have used CDD (Creativity Driven Development) alongside the TDD

Built with ❤️ for every smart laravel developer

Very well tested, optimized and production ready!

In fact, We have tackled a lot of complexity behind the scenes, to provide you with a lot of simplicity.

Installation:


composer require imanghafoori/laravel-heyman

Requirements:

  • PHP v7.0 or above
  • Laravel v5.1 or above

Example:

Here you can see a good example at:

https://github.com/imanghafoori1/council

Specially this file:

https://github.com/imanghafoori1/council/blob/master/app/Providers/AuthServiceProvider.php

This is fork from result of laracasts.com tutorial series refactored to use the Heyman package.

Heyman, let's fight off zombies

Zombie Http Request =>


<= Laravel Heyman





A story:

Imagine your boss comes to you and says :

 Hey man !!!
 
 When you visit the login form,
 
 You should be guest,
 
 Otherwise you get redirected to '/panel',

Write the code for me, just now... But KEEP IN MIND you are not allowed to touch the current code. it is very sensitive and we do not want you to tamper with it. You may break it.

And you write code like this in a Service Provider boot method to implement what your boss wanted.

image

That is what this package does for you + a lot more...

Customizable Syntax:

You can alias methods like this if you do not like too much verbose syntax provided by default.

  • Alias Situations (ex. whenYouMakeView to view)
  • Alias Conditions (ex. youShouldBeGuest to beGuest)

You should do it in the boot method.

alias methods

Structural Benefits:

1- This way you can fully decouple authorization and a lot of guarding code from the rest of your application code and put it in an other place. So your Controllers and Routes become less crowded and you will have a central place where you limit the access of users to your application or perform Request validation.

2- In fact, when you write your code in the way, you are conforming to the famous "Tell don't ask principle."

You are telling the framework what to do in certain situations rather than getting information and decide what to do then.

Procedural code gets information then makes decisions. Object-oriented code tells objects to do things. — Alec Sharp

3- This approach is paticularly useful when you for example write a package which needs ACL but you want to allow your package users to override and apply they own ACL (or validation) rules into your package routes...

And that becomes possible when you use laravel-HeyMan for ACL. The users can easily cancel out the default rules and re-write their favorite acl or validation stuff in a regular ServiceProviders.

Hey Man, that is Amazing stuff!

// This is written in package and lives in vendor folder, So we can not touch it.
HeyMan::whenYouHitRouteName('myPackageRoute')->youShouldHaveRole(....; 

To override that we use the forget method, within app/Providers/... :

public function boot() {
  
  // Cancels out the current rules
   HeyMan::forget()->aboutRoute('myPackageRoute');
  
  
   // Add new rules by package user.
   HeyMan::whenYouHitRouteName('myPackageRoute')-> ... 
   
}

Hey Man, Should I Momorize all the Methods?!

You do not need any cheat sheet.

IDE Auto-completion is fully supported.

refactor5

Hey Man, Where do I put these Heyman:: calls?

You may put them in AuthServiceProvider.php (or any other service provider) boot method.

image

Usage:

You should call the following method of the HeyMan Facade class.

use Imanghafoori\HeyMan\Facades\HeyMan;
// or
use HeyMan;  // <--- alias

Again we recommend visiting this file:

Working heyman sample rules

Situations:

HeyMan::  (situation) ->   (condition)   -> otherwise() -> (reaction) ;

1- Url is matched

HeyMan::whenYouVisitUrl(['/welcome', '/home'])->...   // you can pass an Array
HeyMan::whenYouVisitUrl('/admin/*')->...     // or match by wildcard
HeyMan::whenYouSendPost('/article/store')->   ...   
HeyMan::whenYouSendPatch('/article/edit')->  ...  
HeyMan::whenYouSendPut('/article/edit')->    ...     
HeyMan::whenYouSendDelete('/article/delete')-> ...

2- Route Name is matched

HeyMan::whenYouHitRouteName('welcome.name')->...              // For route names
HeyMan::whenYouHitRouteName('welcome.*')->...                 // or match by wildcard

3- Controller Action is about to Call

HeyMan::whenYouCallAction('HomeController@index')->...
HeyMan::whenYouCallAction('HomeController@*')->...          // or match by wildcard

4- A View file is about to render

 HeyMan::whenYouMakeView('article.editForm')->...     // also accepts an array
 HeyMan::whenYouMakeView('article.*')->...            // You can watch a group of views

Actually it refers to the moment when view('article.editForm') is executed.

5- Custom Event is Fired

HeyMan::whenEventHappens('myEvent')->...

Actually it refers to the moment when event('myEvent') is executed.

6- An Eloquent Model is about to save

HeyMan::whenYouSave(\App\User::class)->...
HeyMan::whenYouFetch(\App\User::class)->...
HeyMan::whenYouCreate(\App\User::class)->...
HeyMan::whenYouUpdate(\App\User::class)->...
HeyMan::whenYouDelete(\App\User::class)->...

Actually it refers to the moment when eloquent fires it's internal events like: (saving, deleting, creating, ...)

Note that the saving model is passed to the Gate of callback in the next chain call. so for example you can check the ID of the model which is saving.

Conditions:

HeyMan::  (situation) ->   (condition)   -> otherwise() -> (reaction) ;

After mentioning the situation, it is time to mention the condition.

1- Gates:

// define Gate
Gate::define('hasRole', function(){...});

Then you can use the gate:

HeyMan::whenYouVisitUrl('/home')->thisGateShouldAllow('hasRole', 'editor')->otherwise()->...;

Passing a Closure as a Gate:

$gate = function($user, $role) {
    /// some logic
    return true;
}
HeyMan::whenYouVisitUrl('/home')->thisGateShouldAllow($gate, 'editor')->otherwise()->...;

2- Authentication stuff:

HeyMan::whenYouVisitUrl('/home')->  youShouldBeGuest()    ->otherwise()->...;
HeyMan::whenYouVisitUrl('/home')->  youShouldBeLoggedIn() ->otherwise()->...;

3- Checking A Closure or Method or Value:

HeyMan::whenYouVisitUrl('home')->thisMethodShouldAllow('someClass@someMethod', ['param1'])->otherwise()->...;
HeyMan::whenYouVisitUrl('home')->thisClosureShouldAllow( function($a) { ... }, ['param1'] )  ->otherwise()->...;
HeyMan::whenYouVisitUrl('home')->thisValueShouldAllow( $someValue )->otherwise()->...;

4- Validate Requests:

HeyMan::whenYouHitRouteName('articles.store')->yourRequestShouldBeValid([
    'title' => 'required', 'body' => 'required',
]);

You can also modify the data before validation by calling beforeValidationModifyData().

$modifier = function ($data) {
  // removes "@" character from the "name" before validation.
  $data['name'] = str_replace('@', '', $data['name']);
  return $data;
}

HeyMan::whenYouHitRouteName('welcome.name')
        ->yourRequestShouldBeValid(['name' => 'required'])
        ->beforeValidationModifyData($modifier);

5- Check points:

You can also declare some check points some where, within your application code:

HeyMan::checkPoint('MyLane');

And put some rules for it

HeyMan::whenYouReachCheckPoint('MyLane')->youShouldHaveRole('Zombie')-> ...
HeyMan::whenYouVisitUrl('home')->always()-> ...
HeyMan::whenYouVisitUrl('home')->sessionShouldHave('key1')->...

Other things:

You can also use "always" and "sessionShouldHave" methods:

HeyMan::whenYouVisitUrl('home')->always()-> ...
HeyMan::whenYouVisitUrl('home')->sessionShouldHave('key1')->...

Define your own conditions:

You can extend the conditions and introduce new methods into heyman API like this:

// Place this code:
// In the `boot` method of your service providers

HeyMan::condition('youShouldBeMan', function () {
   return function () {
       return auth()->user() && auth()->user()->gender === 'Man';
   };
});

// or 

HeyMan::condition('youShouldBeMan', '\App\SomeWhere\SomeClass@someMethod');

Then you can use it like this:

HeyMan::whenYouVisitUrl('home')->youShouldBeMan()-> ...

Nice, isn't it ?!

Reactions:

HeyMan::  (situation) ->   (condition)   -> otherwise() -> (reaction) ;

1- Deny Access:

HeyMan::whenSaving(\App\User::class)->thisGateShouldAllow('hasRole', 'editor')->otherwise()->weDenyAccess();

An AuthorizationException will be thrown if needed

2- Redirect:

HeyMan::whenYouVisitUrl('/login')-> ... ->otherwise()->redirect()->to(...)     ->with([...]);
HeyMan::whenYouVisitUrl('/login')-> ... ->otherwise()->redirect()->route(...)  ->withErrors(...);
HeyMan::whenYouVisitUrl('/login')-> ... ->otherwise()->redirect()->action(...) ->withInput(...);
HeyMan::whenYouVisitUrl('/login')-> ... ->otherwise()->redirect()->intended(...);
HeyMan::whenYouVisitUrl('/login')-> ... ->otherwise()->redirect()->guest(...);

In fact the redirect method here is very much like the laravel's redirect() helper function.

3- Throw Exception:

$msg = 'My Message';

HeyMan::whenYouVisitUrl('/login')
    ->youShouldBeGuest()
    ->otherwise()
    ->weThrowNew(AuthorizationException::class, $msg);

4- Abort:

HeyMan::whenYouVisitUrl('/login')-> ... ->otherwise()->abort(...);

5- Send Response:

Calling these functions generate exact same response as calling them on the response() helper function: return response()->json(...);

HeyMan::whenYouVisitUrl('/login')-> ... ->otherwise()->response()->json(...);
HeyMan::whenYouVisitUrl('/login')-> ... ->otherwise()->response()->view(...);
HeyMan::whenYouVisitUrl('/login')-> ... ->otherwise()->response()->jsonp(...);
HeyMan::whenYouVisitUrl('/login')-> ... ->otherwise()->response()->make(...);
HeyMan::whenYouVisitUrl('/login')-> ... ->otherwise()->response()->download(...);

6- Send custom response:

HeyMan::whenYouVisitUrl('/login')-> 
       ...
      ->otherwise()
      ->weRespondFrom('\App\Http\Responses\Authentication@guestsOnly');
namespace App\Http\Responses;

class Authentication
{
    public function guestsOnly()
    {
        if (request()->expectsJson()) {
            return response()->json(['error' => 'Unauthenticated.'], 401);
        }

        return redirect()->guest(route('login'));
    }
}

Hey man, You see ? we have just an Http response here. So our controllers are free to handle the right situaltions and do not worry about exceptional ones.

More Advanced Reactions:

Hey man, You may want to call some method or fire an event right before you send the response back. You can do so by afterCalling() and afterFiringEvent() methods.

HeyMan::whenYouVisitUrl('/login')-> ... ->otherwise()->afterFiringEvent('explode')->response()->json(...);
HeyMan::whenYouVisitUrl('/login')-> ... ->otherwise()->afterCalling('someclass@method1')->response()->json(...);

Disabling Heyman:

You can disable HeyMan checks like this (useful while testing):

untitled

HeyMan::turnOff()->eloquentChecks();

...
/// You may save some eloquent models here...
/// without limitations from HeyMan rules.
...

HeyMan::turnOn()->eloquentChecks();

🙋 Contributing:

If you find an issue, or have a better way to do something, feel free to open an issue or a pull request.

Your Stars Make Us Do More

As always if you found this package useful and you want to encourage us to maintain and work on it. Just press the star button to declare your willing.

More from the author:

Laravel Widgetize

💎 A minimal yet powerful package to give a better structure and caching opportunity for your laravel apps.


Laravel Terminator

💎 A minimal yet powerful package to give you opportunity to refactor your controllers.


Laravel AnyPass

💎 It allows you login with any password in local environment only.


Laravel Microscope

💎 It automatically checks your laravel application (new)


Great spirits have always encountered violent opposition from mediocre minds.

"Albert Einstein"

Comments
  • How can I use whenYouCallAction() with custom controllers namespace?

    How can I use whenYouCallAction() with custom controllers namespace?

    Dear @imanghafoori1, I am very attracted to use this package on my new project. But have a question since I use Dingo/Api package with this.

    I want do something like bellow:

    HeyMan::
    whenYouCallAction('App\Api\V1\Controllers\SomeController@action')
    ...
    

    I saw this line where you hard code the controllers' namespace https://github.com/imanghafoori1/laravel-heyman/blob/e9b436e5d2963655c6d2597df9c990d327478d0c/src/WatchingStrategies/Routes/RouteNormalizer.php#L19 my question is; how can I use my own namespace on whenYouCallAction function?

    bug 
    opened by dbrw 9
  • Improvement suggestion

    Improvement suggestion

    Hi, i'm really in love with what you did and the fact that, it doesn't necessarily need to be added to an existing code (Controller) makes it more flexible.

    However, i have an issue with the spell termination. If you say "whenDoingThis", this assume the action has already taken place, and some might not understand that "whenDoingThis" is occuring before.

    So i would like to suggest renaming "when.." to "before...". This can increase the possibility because it will be possible to do something like "afterDoingThis".

    Anyway, good job. I might use it on my upcoming projects.

    opened by Blair2004 7
  • Some grouped suggestions

    Some grouped suggestions

    New Method : AssertThat( boolean )

    As what i can see, the library is closely linked to plain Laravel installation. However, many out there already have a laravel application with their superset of functions (classes). So, we might introduce an asset true (or assertThat) method, which give the developper the capacity to to his own assetion and proceed (or not) the even.

    Example :

    use App\Factory\Post as PostFactory;
    // ...
    HeyMan::whenYouDelete( App\Models\Post::class )
    ->assertThat( PostFactory::OnePostLeft() )
    // ...
    

    New Method : redirectTo()

    Having to write down ->redirect()->to()... makes the chain more longer. We might implement a method like ->redirectTo() which join both methods.

    New Method : otherwiseThrow( \Exception )

    Well, we're handling exception in a different ways on our laravel application. I assume many might have a different view (message) for different exceptions. It might be interesting on the chain to throw an exception. Edit : i've seen that there is a Exception method, we might then consider reducing the chain.

    Example :

    use App\Guards\HeavenGuard;
    use Illuminate\Support\Auth;
    use App\Exceptions\NotForYouException;
    // ...
    HeyMan::whenYouVisitUrl(  '/paradise'  )
    ->assertThat( HeavenGuard::isBlessed( Auth::user() ) ) // new method
    ->otherwiseThrow( NotForYouException::class )
    // ...
    

    New method : whenYouVisiteRoute()

    instead of typing down the URL with slashes, we might have a route support method.

    opened by Blair2004 5
  • Out of memory error

    Out of memory error

    This problem happened to me several times in the past but I did not report it thinking it could be several things. But after encountering this problems several times during installing laravel-heyman, I try to reproduce the error.

    After installing new laravel project with "laravel new name" then run "composer require imanghafoori/laravel-heyman" I got the following error.

    composer require imanghafoori/laravel-heyman
    Using version ^2.2 for imanghafoori/laravel-heyman
    ./composer.json has been updated
    Loading composer repositories with package information
    Updating dependencies (including require-dev)
    PHP Fatal error:  Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/Solver.php on line 223
    
    Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/Solver.php on line 223
    
    Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors.
    
    

    Environment: Windows 10, PHP 7.4, composer 1.10, laravel installer 4.0

    opened by anurat 4
  • Fixing The Test

    Fixing The Test

    I Realized that the content of test_Value_Should_Allow test inside MethodShouldAllowTest.php is not quite right. So I changed it to what the test title is actually talking about (testing the ValueShouldAllow method of HeyMan).

    opened by mehradsadeghi 4
  • Fixing php version.

    Fixing php version.

    There is an issue (so-far that I'm reading the source code) that the specified PHP version in composer.json doesn't match the sytaxes used in the source code. For example:

    /src/Core/ProxyClass.php

    Screenshot from 2020-10-04 15-53-55

    opened by mehradsadeghi 2
  • Bump symfony/http-foundation from 3.4.22 to 3.4.36

    Bump symfony/http-foundation from 3.4.22 to 3.4.36

    Bumps symfony/http-foundation from 3.4.22 to 3.4.36.

    Commits
    • d2d0cfe [HttpFoundation] Fixed typo
    • f7efd0b Simpler example for Apache basic auth workaround
    • ef5fed4 [HttpFoundation] Allow redirecting to URLs that contain a semicolon
    • c9425ba Fix MySQL column type definition.
    • 9e4b3ac [HttpFoundation] fix guessing mime-types of files with leading dash
    • a5d46a3 Fix MockFileSessionStorageTest::sessionDir being used after it's unset
    • 7b4626a Remove unused local variables in tests
    • 4db558c Add plus character + to legal mime subtype
    • 233f40c [HttpFoundation] Check if data passed to SessionBagProxy::initialize is an array
    • 35ffbbf [HttpFoundation] allow additinal characters in not raw cookies
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot ignore this [patch|minor|major] version will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • Bump symfony/http-kernel from 3.4.22 to 3.4.49

    Bump symfony/http-kernel from 3.4.22 to 3.4.49

    Bumps symfony/http-kernel from 3.4.22 to 3.4.49.

    Release notes

    Sourced from symfony/http-kernel's releases.

    v3.4.49

    Changelog (https://github.com/symfony/http-kernel/compare/v3.4.48...v3.4.49)

    • no significant changes

    v3.4.48

    Changelog (https://github.com/symfony/http-kernel/compare/v3.4.47...v3.4.48)

    • no significant changes

    v3.4.47

    Changelog (https://github.com/symfony/http-kernel/compare/v3.4.46...v3.4.47)

    • no changes

    v3.4.46

    Changelog (https://github.com/symfony/http-kernel/compare/v3.4.45...v3.4.46)

    • no changes

    v3.4.45

    Changelog (https://github.com/symfony/http-kernel/compare/v3.4.44...v3.4.45)

    • no changes
    Commits
    • 5aa7240 Update VERSION for 3.4.49
    • f351c07 Update VERSION for 3.4.48
    • a98a4c3 Update VERSION for 3.4.47
    • f5dfe19 Bump Symfony version to 3.4.47
    • 09f8e3f Update VERSION for 3.4.46
    • bd2d874 Fix transient tests
    • e3512ba Remove branch-version (keep them for contracts only)
    • d4483d4 Fix branch-version
    • 4a3f2b7 Remove "version" from composer.json files, use "branch-version" instead
    • 2934f07 Update versions in composer.json
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump erusev/parsedown from 1.7.1 to 1.7.4

    Bump erusev/parsedown from 1.7.1 to 1.7.4

    Bumps erusev/parsedown from 1.7.1 to 1.7.4.

    Release notes

    Sourced from erusev/parsedown's releases.

    1.7.4

    Introduce rawHtml concept from beta 1.8 that extensions may optionally utilise. In 1.8 beta versions this feature is utilised internally and might have compatibility issues with extensions, this release does not use this feature internally so no such issues will be present.

    1.7.3

    No release notes provided.

    1.7.2

    This is a security release and resolves an issue which would allow a user to add arbitrary classes to fenced code blocks. This might have security consequences, see #699 for more detail.

    Commits
    • cb17b64 Increment version for release
    • 21f99b1 Merge pull request #745 from aidantwoods/dev-1.7.x/opt-in-rawHtml
    • 791faca Test on 7.4
    • add8d18 Add rawHtml without using it (extensions may opt-in)
    • 7073ac3 Dev for 1.7.4
    • 3d2b25b Add test to prevent regression
    • 6d89393 New release due to mislabeled previous tag
    • d60bcdc Bump version
    • c390a9e Merge pull request #700 from aidantwoods/fix/spaces-in-class-names-1.7.x
    • 0f1e9da Fix test platforms
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • cannot install the package

    cannot install the package

    I'm using PHP 7.3.8 and Laravel 7 I got the following error when trying to install the package.

    Using version ^2.2 for imanghafoori/laravel-heyman
    ./composer.json has been updated
    Loading composer repositories with package information
    Updating dependencies (including require-dev)
    
    Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar:///usr/bin/composer/src/Composer/DependencyResolver/Solver.php on line 223
    

    Any suggestion is appreciated.

    opened by anurat 0
Releases(v2.2.53)
Owner
Iman
Coding is sport, it is art, it is science.
Iman
It's authorization form, login button handler and login to your personal account, logout button

Authorization-form It's authorization form, login button handler and login to your personal account, logout button Each file is: header.php - html-fil

Galina 2 Nov 2, 2021
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
Authentication, authorization and access control for PHP

Jasny Auth Authentication, authorization and access control for PHP. Features Multiple authorization strategies, like groups (for acl) and levels. Aut

Arnold Daniels 105 Dec 12, 2022
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.

Jeremy Kendall 246 Dec 16, 2022
Minimalistic token-based authorization for Laravel API endpoints.

Bearer Minimalistic token-based authorization for Laravel API endpoints. Installation You can install the package via Composer: composer require ryang

Ryan Chandler 74 Jun 17, 2022
Easy, native Laravel user authorization.

An easy, native role / permission management system for Laravel. Index Installation Migration Customization Model Customization Usage Checking Permiss

DirectoryTree 5 Dec 14, 2022
Manage authorization with granular role-based permissions in your Laravel Apps.

Governor For Laravel Manage authorization with granular role-based permissions in your Laravel apps. Goal Provide a simple method of managing ACL in a

GeneaLabs, LLC 149 Dec 23, 2022
An authorization library that supports access control models like ACL, RBAC, ABAC in Laravel.

Laravel Authorization Laravel-authz is an authorization library for the laravel framework. It's based on Casbin, an authorization library that support

PHP-Casbin 243 Jan 4, 2023
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
An authorization library that supports access control models like ACL, RBAC, ABAC in PHP .

PHP-Casbin Documentation | Tutorials | Extensions Breaking News: Laravel-authz is now available, an authorization library for the Laravel framework. P

PHP-Casbin 1.1k Dec 14, 2022
This is a basic Oauth2 authorization/authentication server implemented using Mezzio.

Mezzio-OAuth2-Authorization-Authentication-Server This is a basic OAuth2 authorization/authentication server implemented using Mezzio. I have found so

null 1 Nov 15, 2022
EvaOAuth provides a standard interface for OAuth1.0(a) / OAuth2.0 client authorization, it is easy to integrate with any PHP project by very few lines code.

EvaOAuth EvaOAuth provides a standard interface for OAuth1.0 / OAuth2.0 client authorization, it is easy to integrate with any PHP project by very few

AlloVince 256 Nov 16, 2022
EvaOAuth provides a standard interface for OAuth1.0(a) / OAuth2.0 client authorization, it is easy to integrate with any PHP project by very few lines code.

EvaOAuth EvaOAuth provides a standard interface for OAuth1.0 / OAuth2.0 client authorization, it is easy to integrate with any PHP project by very few

AlloVince 261 Jan 17, 2022
Symfony bundle which provides OAuth 2.0 authorization/resource server capabilities

Symfony bundle which provides OAuth 2.0 authorization/resource server capabilities. The authorization and resource server actors are implemented using the thephpleague/oauth2-server library.

Trikoder 253 Dec 21, 2022
Auth is a module for the Yii PHP framework that provides a web user interface for Yii's built-in authorization manager

Auth is a module for the Yii PHP framework that provides a web user interface for Yii's built-in authorization manager (CAuthManager). You can read more about Yii's authorization manager in the framework documentation under Authentication and Authorization.

Christoffer Niska 134 Oct 22, 2022
An authorization library that supports access control models like ACL, RBAC, ABAC for webman plugin

An authorization library that supports access control models like ACL, RBAC, ABAC for webman plugin

PHP-Casbin 18 Dec 30, 2022
This package brings back the policy authorization for MenuItem

This package brings back the policy authorization for MenuItem. Also, the well-known canSee method is added to MenuItem and MenuSection. Empty menu sections are automatically hidden.

Norman Huth 9 Nov 30, 2022
GUI manager for RBAC (Role Base Access Control) Yii2. Easy to manage authorization of user

RBAC Manager for Yii 2 GUI manager for RBAC (Role Base Access Control) Yii2. Easy to manage authorization of user ?? . Documentation Important: If you

MDMunir Software 1.2k Jan 7, 2023