Download the PHP package ingria/laravel-x509-auth without Composer

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

Client certificate authentication middleware for Laravel 5

Also known as X.509 client authentication.

How does it work

  1. You have a user in your app. For example, Admin:[email protected]
  2. You generate a certificate for that user. Make sure you're using [email protected] for certificate's emailAddress field.
  3. This package allows Admin to use your app without ever logging in.
  4. All users including Admin can still use plain password auth.

Pro tip: you can also use any other certificate attributes for authentication, not only emailAddress (like id or username). I don't think you need this package in that case, but anyway 🤷.

Prerequisites

Please don't blindly copy-paste the commands. It's important for you to know what you're doing.

1. Generate CA and Client certificate

Generating Certificate Authority:

Generating client certificate and signing it with your CA. When asked for the email, enter email of your app's user which will be autheticated with this certificate.

Optionally, generate a PKCS certificate to be installed into the browser, mobile or whatever:

2. Configure your web-server

This example is for NGINX with FastCGI.

You can also add pass some other useful params, see resources below.

Resources

Installation

1. Install the package

This assumes that you have composer installed globally:

2. Register middleware

Add \Ingria\LaravelX509Auth\Middleware\AuthenticateWithClientCertificate::class to your routeMiddleware array in app/Http/Kernel.php.

For example, you can call it auth.x509, by analogy with Laravel's auth.basic name:

Resources

Usage

Just add the middleware's name to any route or controller instead of default auth. For example:

Resources

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-x509-auth with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.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 ingria/laravel-x509-auth contains the following files

Loading the files please wait ....