Download the PHP package b2pweb/parroauth2-client without Composer

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

Parroauth2 Client

build Scrutinizer Code Quality Code Coverage Packagist Version Total Downloads Type Coverage

OAuth 2.0 and OpenID Connect client library for PHP.

Installation

Install with composer :

Simple usage

For a simple usage, using Authorization Server Metadata RFC 8414 or OpenID Connection discovery, you can see example directory.

Password authentication

Authenticate to a provider using password grant type (cf: RFC 6749#4.3).

This example simply configure the OAuth 2.0 client, and call the token endpoint of the provider with owner's credentials (i.e. username and password).

Standard authentication flow

Implements the client-side authentication using authorization_code grant type (cf: RFC 6749#4.1) which is the recommended authorization flow.

Access token check on server side

Check the access token passed as Authorization: Bearer header using local introspection.

Advanced usage

Configure provider manually

If the authentication provider do not implement the auto-discovery, or you want to configure manually, you can use the ProviderBuilder :

Lazy provider

In some case, you should delay the loading of the provider, and only load it when it's necessary. This is necessary when use a dependency injection container which inject the client or the provider into a service.

In this context you can use ProviderLoader::lazy(), which allows loading provider only when calling OP endpoints.

Design consideration

EndPoints

End points are immutable, any call to setters will return a new instance of the endpoint.

So the following code is invalid :

To save a state, like provide a token, you should use Extensions with an EndPointTransformerInterface, or inject parameters manually at each endpoint calls.

Extensions

Extension consist of a class with single method configure() which takes the client as parameter. They permit modifying or configuring any mutable elements of client like :

To simply apply an endpoint transformer, you can inherit AbstractEndPointTransformerExtension, implement the desired endpoint transformation method, and use CallableEndPointInterface::onResponse() to intercept responses.

Note: because endpoints are immutable, the endpoint transformer must return the configured instance of the endpoint


All versions of parroauth2-client with dependencies

PHP Build Version
Package Version
Requires php Version ~7.1 | ~8.0.0 | ~8.1.0 | ~8.2.0 | ~8.3.0
ext-json Version *
php-http/client-common Version ~2.4
php-http/discovery Version ~1.14
psr/http-message-implementation Version ~1.0
psr/http-factory-implementation Version ~1.0
psr/http-message Version ~1.0
psr/http-client Version ~1.0
psr/http-factory Version ~1.0
psr/simple-cache Version ~1.0|~2.0|~3.0
spomky-labs/base64url Version ~2.0
web-token/jwt-signature Version ~1.3|~2.0|~3.0
web-token/jwt-checker Version ~1.3|~2.0|~3.0
web-token/jwt-key-mgmt Version ~1.3|~2.0|~3.0
web-token/jwt-signature-algorithm-ecdsa Version ~1.3|~2.0|~3.0
web-token/jwt-signature-algorithm-eddsa Version ~1.3|~2.0|~3.0
web-token/jwt-signature-algorithm-hmac Version ~1.3|~2.0|~3.0
web-token/jwt-signature-algorithm-none Version ~1.3|~2.0|~3.0
web-token/jwt-signature-algorithm-rsa Version ~1.3|~2.0|~3.0
b2pweb/jwt Version ~1.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 b2pweb/parroauth2-client contains the following files

Loading the files please wait ....