Download the PHP package drago-ex/project-auth without Composer

On this page you can find all versions of the php package drago-ex/project-auth. 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 project-auth

Drago Project Auth

Authentication and user access package for the Drago project. This package provides a complete authentication layer including user login, registration, password recovery and access control. It is designed as a modular extension for projects built on top of the Drago ecosystem and Nette Framework.

PHP version Tests Coding Style

Requirements

Installation

npm Installation

The authentication UI requires the theme switcher and Font Awesome icons:

Files copied into the project

The files are copied into the project by drago-ex/project-tools, as set in extra.drago-tools of this package's composer.json.

Database migration

The package has migration-priority 10, so the users table exists before the packages that use it.

Features

Configuration

Parameters in app/Presentation/Sign/conf.neon:

After signing in, the user goes to the administration (:Backend:Admin:), or to the front page (:Front:Home:) when the ACL does not allow the administration to them. To change it, edit the SignedInDestination and FallbackDestination constants in app/Presentation/Sign/SignPresenter.php.

Behind a reverse proxy, set http: proxy:, otherwise the per-IP limits apply to the proxy address.

Rate limiting

Attempts are counted in the application cache; clearing temp/cache resets them.

Action Limit
Sign-in 10 failed attempts per email and 30 per IP address in 15 minutes
Registration 10 attempts per IP address in an hour
Password recovery 5 requests per email and 20 per IP address in an hour, 10 wrong codes in 15 minutes
New confirmation link 3 requests per email and 10 per IP address in an hour

Security

Emails

The email templates are in Sign/Email/ (shared layout @email.latte, also used by Sign/Recovery/email.latte).

To catch emails locally, add Mailpit to docker-compose.override.yaml:

and point the mailer to it in Sign/conf.neon:

Emails are shown at http://localhost:8025.

Adds a new user to the database

Validates the email and the password (PasswordPolicy), hashes the password, generates a token, and ensures the email is unique.

Secure access to the section

A visitor who is not signed in goes to the sign-in page and, after signing in, back to the requested page.


Optional add-ons

The package works without them. Set them up by hand as described below when the project needs them.

Permissions

The package works without permissions and without drago-ex/permission. For basic permissions, install drago-ex/permission and generate the access rules from bin/create-auth-permission:

Users have no roles of their own until getRolesByUser() in app/Model/User/UserRepository.php returns them. To load them from the database of drago-ex/project-permission, implement it:


All versions of project-auth with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3 <9
drago-ex/database Version ^5.0
drago-ex/application Version ^4.0
drago-ex/form Version ^3.0
drago-ex/migration Version ^1.0
drago-ex/utils Version ^2.0
drago-ex/translator Version ^4.0.1
drago-ex/project-front Version ^3.0
drago-ex/project-backend Version ^1.0
nette/caching Version ^3.3
nette/http Version ^3.0
nette/mail Version ^4.0
nette/security Version ^3.2
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 drago-ex/project-auth contains the following files

Loading the files please wait ...