Download the PHP package keukenmagazijn/passport-authenticator without Composer

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

Laravel Passport Authenticator

Introduction

This package is a self-refreshing Laravel Passport authenticator. There are superclasses available with which you can make quick custom connectors for all your (micro)services and you will never have to worry about having to maintain, refresh or create your bearer tokens yourself.

IMPORTANT! This is for usage with password clients only: https://laravel.com/docs/5.8/passport#creating-a-password-grant-client.

How to install

How to use the package.

The setup

The configuration

The first recommended step is to create a config file for your passport, you don't have to but it's the clean thing to do. So let's say we have this config file available: config/external_application.php

Extending the Library superclasses

This library offers two superclasses, these need to be extended and available in order for the library to do its work properly.

The Authenticator

The Keukenmagazijn\PassportAuthenticator\Abstracts\ConcretePassportAuthenticator code handles all the magic for your credentials. Let's make our own custom authenticator.

app/Components/PassportAuthenticators/Instances/ExampleAuthenticator.php:

Now we need to create a factory as the ConcretePassportAuthenticator depends on this to create a configured authenticator.

The Factory

This is what the method looks like:

So, knowing the method we need to use, let's create our first custom authenticator:

Components\PassportAuthenticators\Factories\ExampleFactory.php:

A production use-case example

So now the set-up is done, you might wonder how you can actually use the package, so I'll show you an example of it!

It's really simple, all you have to do it instantiate the authenticator and use the get/post methods available in the superclasses of this library:

This code will be all you need after the initial set-up!


All versions of passport-authenticator with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
laravel/framework Version >=8.0
rkooistra/super-eloquent-repository Version ^1.0.0
guzzlehttp/guzzle Version ^7.3.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 keukenmagazijn/passport-authenticator contains the following files

Loading the files please wait ....