Download the PHP package webservco/discogs-auth without Composer

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

webservco/discogs-auth

A PHP library for webservco/framework.

Builds the Authorization header for each Discogs authentication type: app key, personal access token and OAuth.

Note: webservco/framework is considered legacy. It has been replaced by individual components, please see webservco/sandbox.


Installation


Usage

Pick the class that matches the access you need:

Class Constructor Use
Discogs\App consumer key, consumer secret Database access as an app, no user.
Discogs\User personal access token Your own account.
OAuth\RequestToken consumer key, consumer secret, callback URL OAuth step 2: GET oauth/request_token.
OAuth\AccessToken consumer key, consumer secret, request token, request token secret, verifier OAuth step 4: POST oauth/access_token.
OAuth\OAuth consumer key, consumer secret, access token, access token secret Every request made on behalf of another user.

Namespaces are relative to WebServCo\DiscogsAuth\.

OAuth flow

  1. Get a consumer key and secret by registering an app on Discogs.
  2. Call oauth/request_token with RequestToken. Keep the returned oauth_token and oauth_token_secret.
  3. Redirect the user to https://discogs.com/oauth/authorize?oauth_token=.... Discogs redirects back to the callback URL with oauth_verifier, or with denied if the user refused.
  4. Call oauth/access_token with AccessToken. Store the returned token and secret.
  5. Use OAuth with the stored token and secret for every request after that, starting with oauth/identity.

The webservco/discogs-examples project has a page for each step.


Notes

The OAuth headers use the PLAINTEXT signature method, so only send them over HTTPS. Each call to getAuthHeader() creates a new nonce and timestamp.

For the "Invalid signature. Expected signature base string" error, see these Discogs forum threads: 730066, 704059.


Development


License

MIT


All versions of discogs-auth with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
webservco/framework Version @dev
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 webservco/discogs-auth contains the following files

Loading the files please wait ...