Download the PHP package amoschou/laravel-remote-auth without Composer

On this page you can find all versions of the php package amoschou/laravel-remote-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 laravel-remote-auth

laravel-remote-auth

Authentication provided by remote servers for Laravel apps.

Laravel remote auth

Installation

Composer and Artisan

Install the package into a newish Laravel app by doing:

Optionally publish the config and view files by doing:

T

Configuration

You will amost always want to publish the config file. It will be made available at config/remote-auth.php.

For details about this file, see Configuration below.

Views

The package makes available the following views:

If published, they will be made available in resources/views/vendor/remote-auth. They can be customised from here.

User model

The package provides a new user class. You will need to reference it in one of two ways:

Either clear out app\Models\User.php and replace it with something like:

Or update config/auth.php so that the key providers.users.model references AMoschou\RemoteAuth\App\Models\User.php.

Migrations

This package provides new migrations to handle users. If you have not yet run migrations in your app, delete the following migration files:

Then do:

Emails

This package sends emails using the Mail facade. Please configure your app for emails.

Routes

This package provides the following routes:

The first three can be disabled by including Settings::ignoreLogInOutRoutes(); in the register() method of a service provider. This gives you a chance to customise the login and logout routes.

The fourth route is the signed URL that is sent to users via email when multi factor authentication is called for.

Drivers

This package provides three drivers for remote authentication:

Traditional username/password authentication is assumed. The LDAP driver valiates credentials using an external LDAP server. The CSV driver validates credentials using a local CSV file. The App driver validates credentials using the app’s database. The CSV and App drivers are not strictly remote but they are useful in many cases. The App driver is also used as a backup method in case the remote server is unavailable.

Configuration

The configuration file, when published, is found at config/remote_auth.php.

It contains a list of providers, where each provider is powered by a driver. Customise this according to the requirements for your app:

The order of providers in this list is important. When a user inputs their username and password into the app’s login form, these credentials are first checked against the first provider. If the username and password are valid, the user is logged in and authenticated to the app. If the first provider can not validate the credentials, then the next provider is tried, and so on, until one is successful. When the credentials are successfully validated, the user details (username, email, hashed password and profile) are stored in the app’s database.

The App driver would normally be listed last. This gives a chance for a successful login attempt in case the remote server is unavailable. There is a security concern as well, which is why the app driver will compulsorily ask for multi-factor authentication. The app will send an email to the user’s stored email address with a link.

Settings can be configured for the drivers of each provider, except the App driver.

For LDAP settings: The connection is an LDAP URL of the form ldap://hostname:port or ldaps://hostname:port. options is an array of options and values (See the PHP function ldap_set_option for details). domain is the directory where users are found, together with the username it is used to build the DN of the user. search is the base DN for the directory that will be searched when collecting user profile values. For LDAP, the profile_map is an array that maps the keys of the user profile according to the app’s requirements to the correspondind keys of the LDAP query.

For CSV settings: The connection is the absolute path to the CSV file. header_offset is an integer representing the header offset in the CSV file, the default is null if it is not set. header is an array of the CSV column headers. This setting is used regardless of the presence of any headers in the CSV file.


All versions of laravel-remote-auth with dependencies

PHP Build Version
Package Version
Requires laravel/framework Version ^11.0
league/csv Version ^9.14
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 amoschou/laravel-remote-auth contains the following files

Loading the files please wait ....