Download the PHP package effectra/third-party without Composer

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

Effectra ThirdParty Library

Effectra\ThirdParty is a PHP library that provides OAuth configuration and functionality for various third-party platforms such as LinkedIn, GitHub, Facebook, and Google. It simplifies the process of integrating with these platforms and accessing user data through OAuth authentication.

Features

Installation

You can install the Effectra\ThirdParty library via Composer. Run the following command in your project directory:

Usage

LinkedIn

To use the LinkedIn OAuth functionality, follow these steps:

  1. Create an instance of the LinkedIn class by providing your LinkedIn client ID, client secret, and optional redirect URL and scopes.

  2. Generate the authorization URL to redirect the user for authentication:

  3. Redirect the user to the generated authorization URL. After successful authentication, LinkedIn will redirect the user back to the specified redirect URL with an authorization code.

  4. Exchange the authorization code for an access token:

  5. Use the access token to retrieve user information:

GitHub

To use the GitHub OAuth functionality, follow these steps:

  1. Create an instance of the GitHub class by providing your GitHub client ID, client secret, and optional redirect URL and scopes.

  2. Generate the authorization URL to redirect the user for authentication:

  3. Redirect the user to the generated authorization URL. After successful authentication, GitHub will redirect the user back to the specified redirect URL with an authorization code.

  4. Exchange the authorization code for an access token:

  5. Use the access token to retrieve user information:

Facebook

To use the Facebook OAuth functionality, follow these steps:

  1. Create an instance of the Facebook class by providing your Facebook client ID, client secret, and optional redirect URL and scopes.

  2. Generate the authorization URL to redirect the user for authentication:

  3. Redirect the user to the generated authorization URL. After successful authentication, Facebook will redirect the user back to the specified redirect URL with an authorization code.

  4. Exchange the authorization code for an access token:

5

. Use the access token to retrieve user information:

Google

To use the Google OAuth functionality, follow these steps:

  1. Create an instance of the Google class by providing your Google client ID, client secret, and optional redirect URL and scopes.

  2. Generate the authorization URL to redirect the user for authentication:

  3. Redirect the user to the generated authorization URL. After successful authentication, Google will redirect the user back to the specified redirect URL with an authorization code.

  4. Exchange the authorization code for an access token:

  5. Use the access token to retrieve user information:

OAuthServiceInterface

The OAuthServiceInterface is an interface that defines the contract for an OAuth service. It provides methods for retrieving configuration, authorization URL, access token, and user data from an OAuth service.

Usage

To use this interface, you need to create a class that implements it and provides the necessary functionality. Here's an example of how you can implement the OAuthServiceInterface:

In the above example, you need to replace the placeholder methods with your actual implementation based on the OAuth service you are integrating with.

Method Overview

getConfig(): array

This method returns the configuration array for the OAuth service.

getAuthURL(): string

This method returns the authorization URL for the OAuth service.

getAccessToken(string $code): string

This method retrieves the access token for the OAuth service using the authorization code provided as a parameter.

getUser(string $token): ?array

This method retrieves the user data from the OAuth service using the access token provided as a parameter. It returns an array containing user data or null if the operation is unsuccessful.

License

This library is open source and available under the MIT License.

Contribution

Contributions are welcome! If you encounter any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request.

Credits

This library is developed and maintained by Effectra. You can find more information about us on our website: www.effectra.com

Contact

For any inquiries or questions, you can reach us at [email protected]


Feel free to modify and customize this README file according to your specific needs.


All versions of third-party with dependencies

PHP Build Version
Package Version
Requires guzzlehttp/guzzle Version ^7.7
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 effectra/third-party contains the following files

Loading the files please wait ....