Download the PHP package stevebauman/corp without Composer

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

Corp

Travis CI Code Climate Scrutinizer Code Quality Latest Stable Version Total Downloads Latest Unstable Version License

An AdLDAP Helper Package for Larvel 4/5

Attention

This package is no longer in development. Please move over to Adldap-Laravel which contains more functionality and flexibility.

Installation

Add Corp to your composer.json file:

"stevebauman/corp": "1.0.*"

Then run "composer update" on your project source.

Add the service provider in "app/config/app.php":

'Stevebauman\Corp\CorpServiceProvider',

Add the alias:

'Corp' => 'Stevebauman\Corp\Facades\Corp',

Publish the config file:

php artisan config:publish stevebauman/corp

Usage

Accessing AdLDAP object

You can access all adldap functions by using:

Corp::adldap();

Example:

Corp::adldap()->group()->info($groupName);
Corp::adldap()->user()->info($username);
Corp::adldap()->user()->inGroup($username);
Corp::adldap()->user()->modify('admin', array('telephone'=>'555 555-5555'));

All functions available here.

Change User Password through standard AdLDAP (SSL or TLS required, must enable in package config file)
Corp::adldap()->user()->password('username', 'password123');
Change User Password through COM (Windows and COM ext required)
Corp::com()->user()->password('username', 'password123'); //Returns boolean
Activate a User through COM
Corp::com()->user()->activate('username'); //Returns boolean
Authenticate an LDAP User
Corp::auth('username', 'password'); // Returns true/false (boolean)
Get user information
$user = Corp::user('username'); // Returns a user object

echo $user->username;

echo $user->name;

echo $user->email

echo $user->group;

echo $user->type;

print_r($user->dn); // Returns distinguished name array
Get an entire user list
$users = Corp::users(); // Returns a laravel collection of user objects of all users on current ldap connection

//Usage for laravel select
Form::select('users', $users->lists('username', 'name'));
Get a computer's information
$computer = Corp::computer('computer name'); // Returns a computer object

echo $computer->name;

echo $computer->os->name; // ex. Windows 7 Professional
echo $computer->os->version; // ex. 6.1 (7601)
echo $computer->os->service_pack; // ex. Service Pack 1

echo $computer->type;

echo $computer->group;

echo $computer->host_name;

print_r($computer->dn);
Get a list of all computers
$computers = Corp::computers();

//Usage for laravel select
Form::select('computers', $computers->lists('name', 'name'));
Get a list of printers
$printers = Corp::printers();

//Usage for laravel select
Form::select('printers', $printers->lists('name', 'name'));
Authenticating with laravel's Auth driver but using LDAP
if (Corp::auth($username, $password)) { //If Passes LDAP Auth

        if(!User::where('username', '=', $username)->first()){ // If web user profile does not exist, create one
                        $corpUser = Corp::user($username);

                        $user = new User;
                        $user->username = $username;
                        $user->email = $corpUser->email;
                        $user->fullname = $corpUser->name;
                        $user->password = Hash::make($password);
                        $user->save();

        } else{ // If web profile does exist, update the password incase of update on active directory
                $user = User::where('username', '=', $username)->first();
                $user->password = Hash::make($password);
                $user->save();
        }

        if(Auth::attempt(array('username'=>$username, 'password'=>$password))){ //If successfully logs in
                return Redirect::route('dashboard.index')
                        ->with('message', sprintf('Welcome %s. You are now logged in.', Auth::user()->fullname))
                        ->with('color', 'success');
                }
        }
} else{
        return Redirect::route('auth.index')
                ->with('message', 'Your email/password combination was incorrect')
                ->with('color', 'danger')
                ->withInput();
}

All versions of corp with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
illuminate/support Version 4.* | 5.*
stevebauman/adldap-fork Version 4.0.*
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 stevebauman/corp contains the following files

Loading the files please wait ....