Download the PHP package stratedge/visa without Composer

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

Build Status Latest Stable Version Total Downloads License

Visa

A complimentary extension of the official Laravel Passport package.

Visa provides the following functionality:

Passport Compatability

While this library mostly adheres to semantic versioning, major version numbers are set to align to major versions for the Passport library. This simplifies determining which version of Visa includes which version of Passport.

Visa Version Configured Passport Version
7.* ^7.0

Installation

Visa is registered with Packagist and can be installed with Composer. Run the following on the command line:

Since Visa extends Passport, installing Visa will install Passport for you.

For versions of Laravel that support auto-registration of packages, Visa will automatically register itself. For older versions, be sure to add Stratedge\Visa\VisaServiceProvider::class to your list of service providers in config/app.php.

No need to include Passport's service provider, the Visa provider extends it.

From here, complete all the typical Passport installation steps.

PLEASE NOTE: See configuration below to ensure you complete any optional Visa configurations before running migrations to ensure columns are created with the correct types.

Configuration

To configure core Passport features, refer to the Passport documentation. Since Visa uses Passport, you're free to configure whatever you want from Passport.

Using Random Strings for Client ID

By default Visa will use random 40-character strings for client IDs, the same as the client secrets. No configuration required.

Using UUIDs for Client ID

Visa also supports UUIDs for client IDs, but must be configured to do so before migrations are run so that the migrations specify the correct column type for client_id.

To use UUIDs, call \Stratedge\Visa\Visa::enableClientUUIDs() in the boot() method of your AppServiceProvider:

Using the CheckFirstPartyClient Middleware

To use the CheckFirstPartyClient middleware, add the following middleware to the $routeMiddleware property of your App\Http\Kernel class:

The middleware can then be registered for any route or route group with the key auth.first-party. Any clients that are not considered first-party that attempt to authenticate with endpoints assigned the CheckFirstPartyClient middleware will fail with an authentication error.

Error Handling

By default, Visa will use the built-in Passport error handler that will catch and respond to errors automatically. If you wish to disable the built-in handler and use the global Laravel error handler to control the logging and output of errors, call \Stratedge\Visa\Visa::disablePassportErrorHandling() in the boot() method of your AppServiceProvider:

Enabling Custom Grants

In order to use your own custom grants, you must extend the Stratedge\Visa\VisaServiceProvider class and overload the enableCustomGrants() method.

The method accepts a single parameter of type League\OAuth2\Server\AuthorizationServer that will be injected automatically as the argument $server. Use the enableGrantType() method of the AuthorizationServer class to enable new grant types.

PLEASE NOTE: When extending the service provider, be sure to register your custom VisaServiceProvider in the app.php configuration file and turn off the auto-discovery of the default provider provided by this library through your composer.json file.

Extension Philosophy

Because Passport is an authorization library, integrating security patches quickly is immensely important. Unlike a fork, which creates a separately maintained version of the entire Passport library, Visa is a complimentary package that sits alongside the core Passport in your project. In that sense Visa extends Passport and makes only the smallest required changes.

In fact, when Visa is installed it will automatically require Passport. But since Passport remains a separate library, the developer is free to specify the version of Passport they wish to use. This allows the developer to take advantage of incremental security updates in Passport without requiring corresponding changes to Visa. So long as the newest version of Passport makes no breaking API changes, changing the Passport version should work just fine.


All versions of visa with dependencies

PHP Build Version
Package Version
Requires laravel/passport Version ^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 stratedge/visa contains the following files

Loading the files please wait ....