Download the PHP package networkrailbusinesssystems/user-login without Composer

On this page you can find all versions of the php package networkrailbusinesssystems/user-login. 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 user-login

User Login.

This package provides user login functionality.

Built for Laravel 11.

Installation

Add the library using Composer:

The service provider will be automatically registered.

Configuration

1. Export the config file

To customize the package, export the configuration file using Artisan:

2. Publish the views.

To modify the login views, publish the package views using Artisan:

3. Available Configuration Options

After publishing, you can modify the following configuration options in the config/user-login.php file:

Option Type Default Usage
view string gov-uk-login Customise the view to be used for the login page
auth-identifier string samaccountname Customise the attribute used for authentication
local-email-indentifer string email Customise the email attribute for the user in local model
local-model class \App\Models\User::class Customise the class for local user
local-model-identifier string username Customise the attribute identifies the user in local model
local-unique-identifier string guid Customise the unique attribute identifies the user in local model
ldap-model class \LdapRecord\Models\ActiveDirectory\User::class Customise the class for LDAP user
ldap-model-identifier string samaccountname Customise the attribute identifies the user in LDAP model
ldap-unique-identifier string objectguid Customise the unique attribute identifies the user in LDAP model
login-failed-message string Sign-in failed; check your details and try again. Customise the message for login failure
login-success-message string You have successfully signed in. Customise the message for login success
forgot-password array 'description' => null, routes => ['label' => 'name'] Customise the "Forgot Password" section in view
You can set a description and routes for IT helpdesk or password reset.

Routing

A route macro is provided to handle the login.

interface: ExistingUser

The ExistingUser interface defines an abstract function for retrieving the unique identifier

Trait: HasGuidInDatabase

The HasGuidInDatabase trait provides a method uniqueIdentifier to fetch a user unique identifier (like a GUID) from your local database.

Trait: HasGuidInLdap

The HasGuidInLdap trait provides a method uniqueIdentifier to fetch a user unique identifier (like a objectguid) from LDAP.

uniqueIdentifier($username)

Usage

The package handles user routing and validation without requiring a custom Login Controller and Login Request.

How to Set Up the Login Functionality

To get the user login functionality up and running, follow these steps:

  1. In your User model or any other model you want to use for authentication, must implement the ExistingUser interface and use one of the provided traits (HasGuidInLdap, HasGuidInDatabase) to retrieve the unique identifier.

  2. Add the following route macro to your routes/web.php file to handle the login routes automatically.

All versions of user-login with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/support Version ^11
anthonyedmonds/govuk-laravel Version ^5
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 networkrailbusinesssystems/user-login contains the following files

Loading the files please wait ....