Download the PHP package webiik/oauth2client without Composer

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

OAuth2Client

The OAuth2Client allows you to connect to any OAuth2 server. Just follow the procedure described in the example below.

Installation

Example

Configuration

Before you can connect to any OAuth2 server, you have to properly configure access credentials and endpoints.

setClientId

setClientId() sets client id.

setClientSecret

setClientSecret() sets client secret.

setRedirectUri

setRedirectUri() sets redirect URI to redirect a user after authorization by OAuth2 server.

setAuthorizeUrl

setAuthorizeUrl() sets URL to authorize a user by OAuth2 server.

setAccessTokenUrl

setAccessTokenUrl() sets URL to obtain a access token.

setValidateTokenUrl

setValidateTokenUrl() sets URL to validate a access token. This endpoint is not official part of OAuth2 specifications, however Google, Facebook etc. provide it.

Login

getAuthorizeUrl

getAuthorizeUrl() prepares a correct link to a URL set by setAuthorizeUrl().

Parameters

Authorization

OAuth2Client allows you to get access token by all grant types provided by OAuth2 protocol. Read more about grant types.

getAccessTokenByCode

getAccessTokenByCode() makes HTTP POST request to a URL set by setAccessTokenUrl(). Returns an array with token(s) on success and a string with cURL error message on error. This grant type is usually used by apps for authenticating users.

getAccessTokenByPassword

getAccessTokenByPassword() makes HTTP POST request to a URL set by setAccessTokenUrl(). Returns an array with token(s) on success and a string with cURL error message on error. This grant type is usually used by trusted apps for authenticating users.

getAccessTokenByCredentials

getAccessTokenByCredentials() makes HTTP POST request to a URL set by setAccessTokenUrl(). Returns an array with token(s) on success and a string with cURL error message on error. This grant type is usually used for server-to-server communication.

getAccessTokenByRefreshToken

getAccessTokenByRefreshToken() makes HTTP POST request to a URL set by refresh_token. It's used to obtain a renewed access token.

getAccessTokenBy

getAccessTokenBy() makes HTTP POST request to a URL set by setAccessTokenUrl(). Returns an array with token(s) on success and a string with cURL error message on error. This method allows you to get access token by custom parameters.

getTokenInfo

getTokenInfo() makes HTTP POST request to a URL set by setValidateTokenUrl(). Returns an array with token(s) on success and a string with cURL error message on error. This is not official part of OAuth2 specifications, however Google, Facebook etc. provide it.

Resources


All versions of oauth2client with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
webiik/curlhttpclient Version ^1
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 webiik/oauth2client contains the following files

Loading the files please wait ....