Download the PHP package sydefz/freelancer-oauth2-client without Composer

On this page you can find all versions of the php package sydefz/freelancer-oauth2-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 freelancer-oauth2-client

OAuth 2.0 Client

This package makes it simple to integrate your application with freelancer OAuth 2.0 service providers.

Requirements

The following versions of PHP are supported.

Usage

Initialize Freelancer OAuth2 Provider

It is recommended to have an understanding of oauth before using this client. For an introduction to Oauth2, see https://www.digitalocean.com/community/tutorials/an-introduction-to-oauth-2, or email and ask the Freelancer Identity Team ([email protected]).

Note: Create your application from http://accounts.freelancer.com/settings/create_app and get it approved before you start

Authorization Code Grant

The authorization code grant type is the most common grant type used when authenticating users with freelancer service. This grant type utilizes a client (this library), a server (the service provider), and a resource owner (the user with credentials to a protected or owned resource) to request access to resources owned by the user. This is often referred to as 3-legged OAuth, since there are three parties involved.

Making an authorized request to freelancer API service.

In order to user freelancer API from you applications, your application needs to be created with certain advanced scopes then you can request user to grant these advanced scopes when retrieve access token.

Take POST https://www.freelancer.com/api/projects/0.1/projects/ Doc reference: https://www.freelancer.com/api/docs/#create-new-project Your application needs to have 'fln:project:create' advanced scopes on creation, and your user will need to consent on that scope so the granted access token now have the permission to call this endpoint.

Refreshing a Token

Once your application is authorized, you can refresh an expired token using a refresh token rather than going through the entire process of obtaining a brand new token. To do so, simply reuse this refresh token from your data store to request a refresh.

Client Credentials Grant

When your application is acting on its own behalf to access resources it controls/owns in a service provider, it may use the client credentials grant type. This is best used when the credentials for your application are stored privately and never exposed (e.g. through the web browser, etc.) to end-users. This grant type functions similarly to the resource owner password credentials grant type, but it does not request a user's username or password. It uses only the client ID and secret issued to your client by the service provider.

Install

Via Composer

License

The MIT License (MIT). Please see License File for more information.


All versions of freelancer-oauth2-client with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.0
league/oauth2-client Version ^1.4
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 sydefz/freelancer-oauth2-client contains the following files

Loading the files please wait ....