Download the PHP package yaquawa/laravel-passport-binary-uuid-adapter without Composer

On this page you can find all versions of the php package yaquawa/laravel-passport-binary-uuid-adapter. 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-passport-binary-uuid-adapter

Introduction

By default Passport does not support using binary UUID.

This package acts as an adapter to allow Passport to be able to use binary UUID.

Notice: this package assumes you are using ramsey/uuid to generate UUID.

Usage

First, pull in the package through Composer.

This package is going to bind some classes of Passport before Passport make them.

So to make it works, this package must be loaded before Passport's service provider.

To guarantee this package's service provider to be loaded before Passport's service provider, in the extra section of your application's composer.json file, add passport to the dont-discover list.

Then manually add Laravel\Passport\PassportServiceProvider::class to providers in config/app.php.

Lastly, change your user provider to eloquent_with_binary_uuid in your config/auth.php.

Furthermore, you can specify an array with model, in that case, the user provider will attempt to retrieve the user from different tables. This is useful when you want to use the same endpoint for a variety of users. For example, if you give both User and Admin model class to the model key, it'll first try to find a User from its table, if it can't then try to find one from Admin 's table using the same user credentials from the incoming request.

Exception Handling

Also, you should override the context method of Illuminate\Foundation\Exceptions\Handler in your App\Exceptions\Handler class. So the userId can be outputted as a normal UUID.

Contributing

I'm not sure if Laravel is going to allow us to use binary UUID in the future. So I'll try to align this package to the latest version of Laravel and Passport as soon as I can. Please if you discover any issues, feel free to send me a PR 🤝.


All versions of laravel-passport-binary-uuid-adapter with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.3
ramsey/uuid Version ^3.7
laravel/passport Version ^6.0|^7.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 yaquawa/laravel-passport-binary-uuid-adapter contains the following files

Loading the files please wait ....