Simple readonly LDAP authentication with Laravel 5.2

Overview

Latest Stable Version License

ldap-auth

Very basic READ ONLY LDAP authentication driver for Laravel 5.2+

Look HERE for the package for Laravel 5.1.
However, only the 5.2 Version will be maintained.

Installation

Step 1: Install Through Composer

Add to your root composer.json and install with composer install or composer update

{
  require: {
    "krenor/ldap-auth": "~2.1"
  }
}

or use composer require krenor/ldap-auth in your console.

Step 2: Add the Service Provider

Modify your config/app.php file and add the service provider to the providers array.

Krenor\LdapAuth\LdapAuthServiceProvider::class,

Step 3: Publish the configuration file by running:

php artisan vendor:publish

Now you're all set!

Configuration

Step 1: Tweak the basic authentication

Update your config/auth.php to use ldap as authentication and the LdapUser Class.

'guards' => [
  	'web' => [
  		'driver'   => 'session',
  		'provider' => 'ldap-users',
	],
],

'providers' => [
	'users'      => [
		'driver' => 'eloquent',
		'model'  => App\User::class,
	],

	'ldap-users' => [
		'driver' => 'ldap',
		'model'  => \Krenor\LdapAuth\Objects\LdapUser::class,
	],
]

Step 2: Adjust the LDAP config to your needs

If you have run php artisan vendor:publish you should see the
ldap.php file in your config directory. Adjust the values as you need them.

Usage

Authentication

Look up here for an Example or Look up here for all Guard methods using $this->auth.

Contributing

Pull Requests

  • PSR-2 Coding Standard

  • Add tests - Your patch won't be accepted if it doesn't have tests.

  • Document any changes - Make sure the README.md and any other relevant documentation are kept up-to-date.

  • Create feature branches - Use git checkout -b my-new-feature

  • One pull request per feature - If you want to do more than one thing, send multiple pull requests.

  • Send coherent history - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please squash them before submitting.

Licence

ldap-auth is distributed under the terms of the MIT license

You might also like...
LogRegPHP is a simple authentication module coded in object-oriented PHP.

LogRegPHP is a simple authentication module coded in object-oriented PHP. It provides you with some helper classes to help you get on speed with your project.

Hej! is a simple authentication boilerplate for Socialite.
Hej! is a simple authentication boilerplate for Socialite.

Hej! - a Socialite authentication flow implementation Hej! is a simple authentication flow implementation for Socialite. Out-of-the-box, Hej! can help

Simple user-authentication solution, embedded into a small framework.
Simple user-authentication solution, embedded into a small framework.

HUGE Just a simple user authentication solution inside a super-simple framework skeleton that works out-of-the-box (and comes with an auto-installer),

:octocat: Socialite is an OAuth2 Authentication tool. It is inspired by laravel/socialite, you can easily use it without Laravel.

Socialite Socialite is an OAuth2 Authentication tool. It is inspired by laravel/socialite, You can easily use it in any PHP project. 中文文档 This tool no

Laravel Auth is a Complete Build of Laravel 8 with Email Registration Verification, Social Authentication, User Roles and Permissions, User Profiles, and Admin restricted user management system.
Laravel Auth is a Complete Build of Laravel 8 with Email Registration Verification, Social Authentication, User Roles and Permissions, User Profiles, and Admin restricted user management system.

Laravel Auth is a Complete Build of Laravel 8 with Email Registration Verification, Social Authentication, User Roles and Permissions, User Profiles, and Admin restricted user management system. Built on Bootstrap 4.

🔐 JSON Web Token Authentication for Laravel & Lumen
🔐 JSON Web Token Authentication for Laravel & Lumen

Documentation Documentation for 1.* here For version 0.5.* See the WIKI for documentation. Supported by Auth0 If you want to easily add secure authent

Library to manage HTTP authentication with PHP. Includes ServiceProviders for easy Laravel integration.

Intervention HttpAuth Library to manage HTTP authentication with PHP. Includes ServiceProviders for easy Laravel integration. Installation You can ins

Minimal Laravel authentication scaffolding with Blade and Tailwind.

Introduction Breeze provides a minimal and simple starting point for building a Laravel application with authentication. Styled with Tailwind, Breeze

User Authentication Managment With Laravel 8

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Comments
  • ldap_search(): Search: Operations erro

    ldap_search(): Search: Operations erro

    Hi I'm trying tu login in my ad server but once de connection is ok it give this error. ErrorException in LdapConnection.php line 146: ldap_search(): Search: Operations error

    In development i'm working with xampp in windows and my ad server is remote.

    opened by ozzargueyo 1
  • Update Ldap.php

    Update Ldap.php

    Instead of setting PROTOCOL, you have to set the VERSION of the protocol. Otherwise you will get an error while authenticating.

    More information: http://php.net/manual/en/function.ldap-set-option.php#example-4933

    opened by drahosistvan 0
  • Custom LDAP port & configuration

    Custom LDAP port & configuration

    I think LDAP connection port should be customizable. Also, several configurations should read from .env file with a fallback by default. I drop an example down below.

    screen shot 2018-03-22 at 11 45 05

    enhancement 
    opened by krsnadjava25 0
Owner
Stan
Programming is as easy as one, February, 3.0000000000004, Error: Index_Out_Of_Bounds
Stan
Laravel 5 Active Directory LDAP Authentication driver.

Active Directory LDAP Authentication Laravel 5 Active Directory LDAP Authentication driver. Fork This is a fork of Cody Covey's ldap-auth package. Unf

Manuel Strebel 33 Aug 19, 2019
Rinvex Authy is a simple wrapper for @Authy TOTP API, the best rated Two-Factor Authentication service for consumers, simplest 2fa Rest API for developers and a strong authentication platform for the enterprise.

Rinvex Authy Rinvex Authy is a simple wrapper for Authy TOTP API, the best rated Two-Factor Authentication service for consumers, simplest 2fa Rest AP

Rinvex 34 Feb 14, 2022
It's a Laravel 8 authentication markdown that will help you to understand and grasp all the underlying functionality for Session and API Authentication

About Auth Starter It's a Laravel 8 authentication markdown that will help you to understand and grasp all the underlying functionality for Session an

Sami Alateya 10 Aug 3, 2022
phpCAS is an authentication library that allows PHP applications to easily authenticate users via a Central Authentication Service (CAS) server.

phpCAS is an authentication library that allows PHP applications to easily authenticate users via a Central Authentication Service (CAS) server.

Apereo Foundation 780 Dec 24, 2022
A Simple method to create laravel authentication for an existing laravel project.

Laravel Simple Auth A Simple method to create laravel authentication for an existing laravel project. Indroduction Why I created this kind of package?

Dasun Tharanga 10 Dec 14, 2021
Laravel Sanctum provides a featherweight authentication system for SPAs and simple APIs.

Introduction Laravel Sanctum provides a featherweight authentication system for SPAs and simple APIs. Official Documentation Documentation for Sanctum

The Laravel Framework 2.4k Dec 30, 2022
A simple two factor authentication for laravel applications

Laravel 2fa A simple two factor authentication for laravel applications. Installation Require via composer Update database Replace authentication trai

Rezkonline 1 Feb 9, 2022
This is a simple laravel authentication built with livewire jetstream.

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Emmanuel Dada 1 Feb 4, 2022
Laravel Passport is an OAuth2 server and API authentication package that is simple and enjoyable to use

Introduction Laravel Passport is an OAuth2 server and API authentication package that is simple and enjoyable to use. Official Documentation Documenta

The Laravel Framework 3.1k Dec 31, 2022
Simple PHP Google Authentication Template

php-google-auth A php google authentication page project View Demo · Report Problems About The Project This is a small and easy project that I made to

Antonio 4 Nov 21, 2021