Download the PHP package zofe/auth-module without Composer

On this page you can find all versions of the php package zofe/auth-module. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package auth-module

Rapyd Admin - Auth Module

This is the auth module of Rapyd Admin, a Laravel application bootstrap for your projects

It embed:

Login / Registration & Two factor authentication

This module give you out of the box a fortify implementation https://laravel.com/docs/10.x/fortify#main-content with a bootstrap layout and default configuration you can customize on ./config/fortify.php

Permissions & Models

Two Models will be provided by this module:

As you can imagine the role is a characteristic you can associate with a user, permissions are the "actions granted" for that role.

The module has a configuration file that allows you to define roles, permissions, and the relationship between them.

The editable configuration is provided in ./config/permission.php Then you need to run the provided seeder.

these features are based on the library: https://github.com/spatie/laravel-permission

Impersonation

One of the necessary features in the implementation of a backend is to impersonate other users/customers, this module has this functionality built in

This module include a trait App\Modules\Auth\Traits\Impersonate to check roles if user can impersonate other and to check if user can be impersonated.

By default, this trait add check if You are admin and the user you want to impersonate is not an admin (using roles).

for a custom implementation override canImpersonate() and canBeImpersonated() in your model

this features is based on the library https://github.com/lab404/laravel-impersonate

Component roles & permissions

Authorize trait

This module include a trait App\Modules\Auth\Traits\Authorize to check roles or permissions before build/render/execute component actions.

you can just include the trait, then add authorize check at booted time in your components:

this will check if one of role or permission is applied to the logged-in user, otherwise it gives a permission error.

Limit trait

This module include a trait App\Modules\Auth\Traits\Limit to add global scopes in your application, specific for role you need to jailroot eloquent models to specific query scopes.

limit inside booted method will deal with all classes in Modules/*/Limits/LimitName.php to add specific global scopes. In the example below a global scope is added on Company model to be sure to bind queries on companies to those that are either the same as the logged-in user or are "daughters" of the one to which the logged-in user belongs.

Component priority role based

This module include a middleware out of the box, that search for priority component instead of the one defaulted by the route.

By "priority component" we mean a component that is prefixed with the "Rolename" of the logged-in user e.g., despite the defined route :

Route::get('/companies/view/{company:id}', CompaniesView::class)

Customer role user the middleware looks for CustomerCompaniesView::class and dispenses that if it exists.

this allows you to extend livewire components and adapt features and views potentially for each role to be managed (if you need to do so).

Just configure your prefixes in the config:

add the middleware in your app/Http/Kernel.php

Component role to component specific routes

assuming you're using Ticket open source module, you can customize that a custom role i.e. "customer" can open ticket using:

this way the routes tickets.tickets.table and tickets.tickets.view will be server by your custom implementation of components (which can extend the default ticket module components)

Installation & configuration

This module is part of Rapyd Admin package


All versions of auth-module with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/config Version ^11.0
illuminate/contracts Version ^11.0
lab404/laravel-impersonate Version ^1.7.5
spatie/laravel-permission Version ^6.7.0
laravel/fortify Version ^v1.21.3
propaganistas/laravel-disposable-email Version ^2.4.0
laravel/socialite Version ^5.16
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package zofe/auth-module contains the following files

Loading the files please wait ....