Download the PHP package simianbv/introspect without Composer

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

Installation

Install the package on your resource server

composer require simianbv\introspect

and add the Service Provider in your config/app.php

~~~.php 'providers' => [ // [..] \Simianbv\Introspect\ServiceProvider::class // [..] ];


and add the MiddleWare in your `App/Http/Kernel.php`

~~~.php
protected $routeMiddleware = [
    // [..]
    'introspect' => \Simianbv\Introspect\VerifyAccessToken::class,
    // [..]   
];

publish the configuration

php artisan vendor:publish

Finally in your .env file, define the following properties

~~~.properties

Url of the authorization server

INTROSPECT_URL="https://authorization.server.dom"

Client Identifier as defined in https://tools.ietf.org/html/rfc6749#section-2.2

INTROSPECT_CLIENT_ID="123"

The client secret

INTROSPECT_CLIENT_SECRET="abcdefg"

Endpoint for requesting the access token

INTROSPECT_TOKEN_URL="${INTROSPECT_URL}/oauth/token"

The OAuth2 Introspection endpoint https://tools.ietf.org/html/rfc7662

INTROSPECT_INTROSPECT_URL="${INTROSPECT_URL}/oauth/introspect"

Optional configuration for requesting an OAuth2 access tokens using the implicit grant flow

INTROSPECT_AUTHORIZATION_URL="${INTROSPECT_URL}/oauth/authorize" INTROSPECT_REDIRECT_URL=https://my.machine.dom

the cache prefix to create a unique key per microservice, defaults to the APP_NAME

INTROSPECT_CACHE_PREFIX=HR

the endpoints for calling in customer/employee or user data

INTROSPECT_USERS_ENDPOINT="${INTROSPECT_URL}/api/users" INTROSPECT_EMPLOYEES_ENDPOINT="${INTROSPECT_URL}/api/employees" INTROSPECT_CUSTOMERS_ENDPOINT="${INTROSPECT_URL}/api/customers"


Now, use the middleware.

~~~.php
Route::group(['middleware'=>'introspect:required-scope1,required-scope2'], function () {
    Route::get('/endpoint1', 'UserController@index');
    Route::resource('/resource', 'OrderController');
});

All versions of introspect with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3|^8.0|^8.1
calebporzio/sushi Version ^2.0
guzzlehttp/guzzle Version ~6.0|~7.0
ext-json Version *
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 simianbv/introspect contains the following files

Loading the files please wait ....