PHPackages                             advanced-store/oauth2-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. advanced-store/oauth2-client

AbandonedArchivedLibrary[Authentication &amp; Authorization](/categories/authentication)

advanced-store/oauth2-client
============================

Oauth2-Client for simple connect with Oauth2-Server (3rd Party or Own-Aplications)

0310[2 issues](https://github.com/advancedSTORE/oauth2-client/issues)PHP

Since Sep 15Pushed 10y ago7 watchersCompare

[ Source](https://github.com/advancedSTORE/oauth2-client)[ Packagist](https://packagist.org/packages/advanced-store/oauth2-client)[ RSS](/packages/advanced-store-oauth2-client/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (2)Used By (0)

[![Creative Commons License](https://camo.githubusercontent.com/627f8381f39aaac7fd5516a4eb37d169132626708878080d77999e11b1321eea/687474703a2f2f692e6372656174697665636f6d6d6f6e732e6f72672f6c2f62792d6e632d6e642f342e302f38307831352e706e67)](http://creativecommons.org/licenses/by-nc-nd/4.0/)
This work is licensed under a [Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License](http://creativecommons.org/licenses/by-nc-nd/4.0/).

OAuth2 - Client
===============

[](#oauth2---client)

 This Package can be used to connect to an OAuth2-Service and fetch OAuth2 restricted resources.

1. Installation
---------------

[](#1-installation)

### via Composer

[](#via-composer)

 Update your `composer.json` "require"-Section with this line:

    ```

    "advanced-store/oauth2-client": "dev-master"

```

 After adding this line, run the following command:

    ```

    composer install
    or
    composer update

```

2. Configuration
----------------

[](#2-configuration)

 You need to publish the configuration file of this package with:

    ```

    php artisan config:publish advanced-store/oauth2-client

```

 The Config-File path is `app/config/advanced-store/oauth2-client/config.php`

 Here you have to add/modify the values for your purpose.
 \[client.id\] - Client-ID of your Application
 \[client.secret\] - Client-Secret of your Application
 \[scopes\] - Scopes for your Application (comma separated)

 After modifying the Package-Config, update the `app/config/app.php`
 Modify your **providers and aliases** section, with your preferred alias:

```
'providers' => array('AdvancedStore\Oauth2Client\Oauth2ClientServiceProvider')

'aliases' => array('OAuth2Client'	=> 'AdvancedStore\Oauth2Client\Facades\Oauth2ClientFacade')

```

3. Examples
-----------

[](#3-examples)

### Fetch Access-Token

[](#fetch-access-token)

    ```

    OAuth2Client::fetchAccessToken('http://3rd.party.com/api/access_token', 'password', array(
        'username'	=> $credentials['username'],
        'password'	=> $credentials['password'],
        'scope'		=> Config::get('oauth2-client::scopes'),
    ));

```

### Requesting a OAuth2 - Restricted Resource/URL

[](#requesting-a-oauth2---restricted-resourceurl)

    ```

    $result = OAuth2Client::fetch('http://3rd.party.com/api/restriced/resource');

```

4. Constants
------------

[](#4-constants)

#### Auth methods

[](#auth-methods)

- AUTH\_TYPE\_URI
- AUTH\_TYPE\_AUTHORIZATION\_BASIC
- AUTH\_TYPE\_FORM

#### Access token types

[](#access-token-types)

- ACCESS\_TOKEN\_URI
- ACCESS\_TOKEN\_BEARER
- ACCESS\_TOKEN\_OAUTH
- ACCESS\_TOKEN\_MAC

#### Grant types

[](#grant-types)

- GRANT\_TYPE\_AUTH\_CODE
- GRANT\_TYPE\_PASSWORD
- GRANT\_TYPE\_CLIENT\_CREDENTIALS
- GRANT\_TYPE\_REFRESH\_TOKEN

#### HTTP Methods

[](#http-methods)

- HTTP\_METHOD\_GET
- HTTP\_METHOD\_POST
- HTTP\_METHOD\_PUT
- HTTP\_METHOD\_DELETE
- HTTP\_METHOD\_HEAD
- HTTP\_METHOD\_PATCH

#### HTTP Form content types

[](#http-form-content-types)

- HTTP\_FORM\_CONTENT\_TYPE\_APPLICATION
- HTTP\_FORM\_CONTENT\_TYPE\_MULTIPART

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/a4ce006ef5b39b9d837fb4b74d896b34002c347175d245350e789332e96c5e7e?d=identicon)[JayJayOne](/maintainers/JayJayOne)

![](https://www.gravatar.com/avatar/b25753c82bed76fed41c46b043e66bd0deeec51e6bff9a2959c2c54d1e0f9dba?d=identicon)[nomnom](/maintainers/nomnom)

![](https://www.gravatar.com/avatar/246197031cb854a91208027415eaac92ffde87752ac76bbc0d3dcbc75b1ccb4f?d=identicon)[StephanAS](/maintainers/StephanAS)

### Embed Badge

![Health badge](/badges/advanced-store-oauth2-client/health.svg)

```
[![Health](https://phpackages.com/badges/advanced-store-oauth2-client/health.svg)](https://phpackages.com/packages/advanced-store-oauth2-client)
```

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
