Download the PHP package keboola/oauth-v2-php-client without Composer

On this page you can find all versions of the php package keboola/oauth-v2-php-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 oauth-v2-php-client

OAuth v2 PHP Client

GitHub Actions

Keboola OAuth v2 API client, built on keboola/php-api-client-base.

Installation

Usage

Both clients take the API base URL and the auth token first, followed by optional, named transport options (logger, backoffMaxTries, connectTimeout, requestTimeout, userAgent, requestHandler).

Credentials (Storage API token)

Manager (application token)

The application token is optional. When omitted (or null), the client authenticates with the projected Kubernetes ServiceAccount token instead of X-KBC-ManageApiToken:

GitHub App installation token

mintOrganizationToken() gets a short-lived GitHub App installation token for one repository of the organization's GitHub connection. The endpoint accepts only an application identity (application token or ServiceAccount token), never a Storage API token. The returned #token is a KBC::ProjectSecure:: cipher for the given project and component.

A failed request throws ClientException with the response status code. 400, 404, 412 and 422 mean the request cannot succeed as it is (unknown project or GitHub host, no GitHub connection for the organization, repository not covered by the installation). 401 and 403 are about the caller's identity, and 5xx is a server error. A connection failure has no status code. A successful response that is not valid JSON, has no non-empty #token or has no string expiresAt also throws ClientException; its status code is either null or the 2xx code.

On a failed request both clients throw Keboola\OAuthV2Api\Exception\ClientException (a subclass of Keboola\ApiClientBase\Exception\ClientException), which exposes getStatusCode() and getResponseBody() for the failing response when available.

Development

License

MIT licensed, see LICENSE file.


All versions of oauth-v2-php-client with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
guzzlehttp/guzzle Version ^7.8
keboola/php-api-client-base Version ^1.1.1
psr/http-message Version ^1.0|^2.0
psr/log Version ^1.0|^2.0|^3.0
webmozart/assert Version ^1.11
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 keboola/oauth-v2-php-client contains the following files

Loading the files please wait ...