The Salla OAuth Client library is designed to provide client applications with secure delegated access to Salla Merchant stores.

Overview

Salla Provider for OAuth 2.0 Client

This package provides Salla OAuth 2.0 support for the PHP League's OAuth 2.0 Client.

To use this package, it will be necessary to have a Salla client ID and client secret. These are referred to as {client-id} and {client-secret} in the documentation.

Please follow the Salla instructions to create the required credentials.

OAuth Workflow

OAuth Workflow

Installation

You can install the package via composer:

composer require salla/ouath2-merchant

Usage

Authorization Code Flow

<?php

use Salla\OAuth2\Client\Provider\Salla;

$provider = new Salla([
    'clientId'     => '{client-id}', // The client ID assigned to you by Salla
    'clientSecret' => '{client-secret}', // The client password assigned to you by Salla
    'redirectUri'  => 'https://yourservice.com/callback_url', // the url for current page in your service
]);

if (!isset($_GET['code']) || empty($_GET['code'])) {
    // If we don't have an authorization code then get one
    $authUrl = $provider->getAuthorizationUrl([
        'scope' => 'offline_access',
        //Important: If you want to generate the refresh token, set this value as offline_access
    ]);

    header('Location: '.$authUrl);
    exit;
}

// Try to obtain an access token by utilizing the authorisations code grant.
try {
    $token = $provider->getAccessToken('authorization_code', [
        'code' => $_GET['code']
    ]);

    //
    // ## Access Token
    //
    // You should store the access token
    // which may use in authenticated requests against the Salla's API
    echo 'Access Token: '.$token->getToken()."<br>";

    //
    // ## Refresh Token
    //
    // You should store the refresh token in somewhere in your system because the access token expired after 14 days
    // so you can use the refresh token after that to generate an new access token without ask any access from the merchant
    //
    // $token = $provider->getAccessToken(new RefreshToken(), ['refresh_token' => $token->getRefreshToken()]);
    //
    echo 'Refresh Token: '.$token->getRefreshToken()."<br>";

    //
    // ## Expire date
    //
    // This help you to know when the access token will expired
    // so before that date you should generate a new access token using the refresh token
    echo 'Expire Date : '.$token->getExpires()."<br>";

    //
    // ## Merchant Details
    //
    // Using the access token, we may look up details about the merchant.
    // --- Same request in Curl ---
    // curl --request GET --url 'https://accounts.salla.sa/oauth2/user/info' --header 'Authorization: Bearer <access-token>'

    /** @var \Salla\OAuth2\Client\Provider\SallaUser $user */
    $user = $provider->getResourceOwner($token);

    /**
     *  {
     *      "id": 181690847,
     *      "name": "eman elsbay",
     *      "email": "[email protected]",
     *      "mobile": "555454545",
     *      "role": "user",
     *      "created_at": "2018-04-28 17:46:25",
     *      "store": {
     *        "id": 633170215,
     *        "owner_id": 181690847,
     *        "owner_name": "eman elsbay",
     *        "username": "good-store",
     *        "name": "متجر الموضة",
     *        "avatar": "https://cdn.salla.sa/XrXj/g2aYPGNvafLy0TUxWiFn7OqPkKCJFkJQz4Pw8WsS.jpeg",
     *        "store_location": "26.989000873354787,49.62477639657287",
     *        "plan": "special",
     *        "status": "active",
     *        "created_at": "2019-04-28 17:46:25"
     *      }
     *    }
     */
    var_export($user->toArray());

    echo 'User ID: '.$user->getId()."<br>";
    echo 'User Name: '.$user->getName()."<br>";
    echo 'Store ID: '.$user->getStoreID()."<br>";
    echo 'Store Name: '.$user->getStoreName()."<br>";


    //
    // 🥳
    //
    // You can now save the access token and refresh token in your database
    // with the merchant details and redirect him again to Salla dashboard (https://s.salla.sa/apps)


    //
    // ## Access to authenticated APIs for the merchant
    //
    // You can also use the same package to call any authenticated APIs for the merchant
    // Using the access token, information can be obtained from a list of endpoints.
    //
    // --- Same request in Curl ---
    // curl --request GET --url 'https://api.salla.dev/admin/v2/orders' --header 'Authorization: Bearer <access-token>'
    $response = $provider->fetchResource(
        'GET',
        'https://api.salla.dev/admin/v2/orders',
        $token->getToken()
    );
    
    var_export($response);

} catch (\League\OAuth2\Client\Provider\Exception\IdentityProviderException $e) {
    // Failed to get the access token or merchant details.
    // show a error message to the merchant with good UI
    exit($e->getMessage());
}

Refreshing a Token

Refresh tokens are only provided to applications which request offline access. You can specify offline access by passing the scope option in your getAuthorizationUrl() request.

use Salla\OAuth2\Client\Provider\Salla;

$provider = new Salla([
    'clientId' => '{client-id}',
    'clientSecret' => '{client-secret}',
]);

$refreshToken = 'FromYourStoredData';
$token = $provider->getAccessToken('refresh_token', ['refresh_token' => $refreshToken]);

Testing

composer test

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

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

Comments
  • Refresh token expires_in is not correct

    Refresh token expires_in is not correct

    Hi team I think there is an issue the expires date when we refresh the token It's always come back with this:

    {"expires_in": 1209600}
    

    I don't think it this the right expire date

    opened by Hussam3bd 2
  • Update mockery/mockery requirement from ~1.3.0 || ~1.3.0 || ~1.3.0 || ~1.3.0 to ~1.3.0 || ~1.3.0 || ~1.3.0 || ~1.3.0 || ~1.3.0

    Update mockery/mockery requirement from ~1.3.0 || ~1.3.0 || ~1.3.0 || ~1.3.0 to ~1.3.0 || ~1.3.0 || ~1.3.0 || ~1.3.0 || ~1.3.0

    Updates the requirements on mockery/mockery to permit the latest version.

    Changelog

    Sourced from mockery/mockery's changelog.

    Change Log

    1.5.1 (2022-xx-xx)

    • [PHP 8.2] Various tests: explicitly declare properties #1170
    • [PHP 8.2] Fix "Use of "parent" in callables is deprecated" notice #1169
    • [PHP 8.1] Support intersection types #1164
    • Handle final __toString methods #1162

    1.5.0 (2022-01-20)

    • Override default call count expectations via expects() #1146
    • Mock methods with static return types #1157
    • Mock methods with mixed return type #1156
    • Mock classes with new in initializers on PHP 8.1 #1160
    • Removes redundant PHPUnitConstraint #1158

    1.4.4 (2021-09-13)

    • Fixes auto-generated return values #1144
    • Adds support for tentative types #1130
    • Fixes for PHP 8.1 Support (#1130 and #1140)
    • Add method that allows defining a set of arguments the mock should yield #1133
    • Added option to configure default matchers for objects \Mockery::getConfiguration()->setDefaultMatcher($class, $matcherClass) #1120

    1.4.3 (2021-02-24)

    • Fixes calls to fetchMock before initialisation #1113
    • Allow shouldIgnoreMissing() to behave in a recursive fashion #1097
    • Custom object formatters #766 (Needs Docs)
    • Fix crash on a union type including null #1106

    1.3.4 (2021-02-24)

    • Fixes calls to fetchMock before initialisation #1113
    • Fix crash on a union type including null #1106

    1.4.2 (2020-08-11)

    • Fix array to string conversion in ConstantsPass (#1086)
    • Fixed nullable PHP 8.0 union types (#1088, #1089)
    • Fixed support for PHP 8.0 parent type (#1088, #1089)
    • Fixed PHP 8.0 mixed type support (#1088, #1089)
    • Fixed PHP 8.0 union return types (#1088, #1089)

    1.4.1 (2020-07-09)

    • Allow quick definitions to use 'at least once' expectation \Mockery::getConfiguration()->getQuickDefinitions()->shouldBeCalledAtLeastOnce(true) (#1056)
    • Added provisional support for PHP 8.0 (#1068, #1072,#1079)

    ... (truncated)

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies php 
    opened by dependabot[bot] 1
  • Error when trying to use getResourceOwner

    Error when trying to use getResourceOwner

    Hi team 👨‍💻

    I have this error when I try to do this:

    League\OAuth2\Client\Provider\AbstractProvider::getResourceOwner(): Argument #1 ($token) must be of type League\OAuth2\Client\Token\AccessToken, string given
    

    I used it as it was mentioned in the docs, here is my code:

    $token = $this->provider->getAccessToken('authorization_code', [
        'code' => $request->get('code')
    ]);
    
    $this->provider->getResourceOwner($token->getToken())
    

    I get it manged to work by doing this:

    $this->provider->getResourceOwner(
        new \League\OAuth2\Client\Token\AccessToken([
            'access_token' => $token->getToken(),
        ])
    ));
    

    I think either it should be fixed or changed in the documentations

    opened by Hussam3bd 1
  • Update mockery/mockery requirement from ~1.3.0 || ~1.3.0 || ~1.3.0 to ~1.3.0 || ~1.3.0 || ~1.3.0 || ~1.3.0

    Update mockery/mockery requirement from ~1.3.0 || ~1.3.0 || ~1.3.0 to ~1.3.0 || ~1.3.0 || ~1.3.0 || ~1.3.0

    Updates the requirements on mockery/mockery to permit the latest version.

    Changelog

    Sourced from mockery/mockery's changelog.

    Change Log

    1.5.1 (2022-xx-xx)

    • [PHP 8.2] Various tests: explicitly declare properties #1170
    • [PHP 8.2] Fix "Use of "parent" in callables is deprecated" notice #1169
    • [PHP 8.1] Support intersection types #1164
    • Handle final __toString methods #1162

    1.5.0 (2022-01-20)

    • Override default call count expectations via expects() #1146
    • Mock methods with static return types #1157
    • Mock methods with mixed return type #1156
    • Mock classes with new in initializers on PHP 8.1 #1160
    • Removes redundant PHPUnitConstraint #1158

    1.4.4 (2021-09-13)

    • Fixes auto-generated return values #1144
    • Adds support for tentative types #1130
    • Fixes for PHP 8.1 Support (#1130 and #1140)
    • Add method that allows defining a set of arguments the mock should yield #1133
    • Added option to configure default matchers for objects \Mockery::getConfiguration()->setDefaultMatcher($class, $matcherClass) #1120

    1.4.3 (2021-02-24)

    • Fixes calls to fetchMock before initialisation #1113
    • Allow shouldIgnoreMissing() to behave in a recursive fashion #1097
    • Custom object formatters #766 (Needs Docs)
    • Fix crash on a union type including null #1106

    1.3.4 (2021-02-24)

    • Fixes calls to fetchMock before initialisation #1113
    • Fix crash on a union type including null #1106

    1.4.2 (2020-08-11)

    • Fix array to string conversion in ConstantsPass (#1086)
    • Fixed nullable PHP 8.0 union types (#1088, #1089)
    • Fixed support for PHP 8.0 parent type (#1088, #1089)
    • Fixed PHP 8.0 mixed type support (#1088, #1089)
    • Fixed PHP 8.0 union return types (#1088, #1089)

    1.4.1 (2020-07-09)

    • Allow quick definitions to use 'at least once' expectation \Mockery::getConfiguration()->getQuickDefinitions()->shouldBeCalledAtLeastOnce(true) (#1056)
    • Added provisional support for PHP 8.0 (#1068, #1072,#1079)

    ... (truncated)

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies php 
    opened by dependabot[bot] 0
  • Update mockery/mockery requirement from ~1.3.0 || ~1.3.0 to ~1.3.0 || ~1.3.0 || ~1.3.0

    Update mockery/mockery requirement from ~1.3.0 || ~1.3.0 to ~1.3.0 || ~1.3.0 || ~1.3.0

    Updates the requirements on mockery/mockery to permit the latest version.

    Changelog

    Sourced from mockery/mockery's changelog.

    Change Log

    1.5.1 (2022-xx-xx)

    • [PHP 8.2] Various tests: explicitly declare properties #1170
    • [PHP 8.2] Fix "Use of "parent" in callables is deprecated" notice #1169
    • [PHP 8.1] Support intersection types #1164
    • Handle final __toString methods #1162

    1.5.0 (2022-01-20)

    • Override default call count expectations via expects() #1146
    • Mock methods with static return types #1157
    • Mock methods with mixed return type #1156
    • Mock classes with new in initializers on PHP 8.1 #1160
    • Removes redundant PHPUnitConstraint #1158

    1.4.4 (2021-09-13)

    • Fixes auto-generated return values #1144
    • Adds support for tentative types #1130
    • Fixes for PHP 8.1 Support (#1130 and #1140)
    • Add method that allows defining a set of arguments the mock should yield #1133
    • Added option to configure default matchers for objects \Mockery::getConfiguration()->setDefaultMatcher($class, $matcherClass) #1120

    1.4.3 (2021-02-24)

    • Fixes calls to fetchMock before initialisation #1113
    • Allow shouldIgnoreMissing() to behave in a recursive fashion #1097
    • Custom object formatters #766 (Needs Docs)
    • Fix crash on a union type including null #1106

    1.3.4 (2021-02-24)

    • Fixes calls to fetchMock before initialisation #1113
    • Fix crash on a union type including null #1106

    1.4.2 (2020-08-11)

    • Fix array to string conversion in ConstantsPass (#1086)
    • Fixed nullable PHP 8.0 union types (#1088, #1089)
    • Fixed support for PHP 8.0 parent type (#1088, #1089)
    • Fixed PHP 8.0 mixed type support (#1088, #1089)
    • Fixed PHP 8.0 union return types (#1088, #1089)

    1.4.1 (2020-07-09)

    • Allow quick definitions to use 'at least once' expectation \Mockery::getConfiguration()->getQuickDefinitions()->shouldBeCalledAtLeastOnce(true) (#1056)
    • Added provisional support for PHP 8.0 (#1068, #1072,#1079)

    ... (truncated)

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Update mockery/mockery requirement from ~1.3.0 to ~1.3.0 || ~1.3.0

    Update mockery/mockery requirement from ~1.3.0 to ~1.3.0 || ~1.3.0

    Updates the requirements on mockery/mockery to permit the latest version.

    Changelog

    Sourced from mockery/mockery's changelog.

    Change Log

    1.5.1 (2022-xx-xx)

    • [PHP 8.2] Various tests: explicitly declare properties #1170
    • [PHP 8.2] Fix "Use of "parent" in callables is deprecated" notice #1169
    • [PHP 8.1] Support intersection types #1164
    • Handle final __toString methods #1162

    1.5.0 (2022-01-20)

    • Override default call count expectations via expects() #1146
    • Mock methods with static return types #1157
    • Mock methods with mixed return type #1156
    • Mock classes with new in initializers on PHP 8.1 #1160
    • Removes redundant PHPUnitConstraint #1158

    1.4.4 (2021-09-13)

    • Fixes auto-generated return values #1144
    • Adds support for tentative types #1130
    • Fixes for PHP 8.1 Support (#1130 and #1140)
    • Add method that allows defining a set of arguments the mock should yield #1133
    • Added option to configure default matchers for objects \Mockery::getConfiguration()->setDefaultMatcher($class, $matcherClass) #1120

    1.4.3 (2021-02-24)

    • Fixes calls to fetchMock before initialisation #1113
    • Allow shouldIgnoreMissing() to behave in a recursive fashion #1097
    • Custom object formatters #766 (Needs Docs)
    • Fix crash on a union type including null #1106

    1.3.4 (2021-02-24)

    • Fixes calls to fetchMock before initialisation #1113
    • Fix crash on a union type including null #1106

    1.4.2 (2020-08-11)

    • Fix array to string conversion in ConstantsPass (#1086)
    • Fixed nullable PHP 8.0 union types (#1088, #1089)
    • Fixed support for PHP 8.0 parent type (#1088, #1089)
    • Fixed PHP 8.0 mixed type support (#1088, #1089)
    • Fixed PHP 8.0 union return types (#1088, #1089)

    1.4.1 (2020-07-09)

    • Allow quick definitions to use 'at least once' expectation \Mockery::getConfiguration()->getQuickDefinitions()->shouldBeCalledAtLeastOnce(true) (#1056)
    • Added provisional support for PHP 8.0 (#1068, #1072,#1079)

    ... (truncated)

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Update phpunit/phpunit requirement from ~7.0.0 to ~7.0.0 || ~7.5.0

    Update phpunit/phpunit requirement from ~7.0.0 to ~7.0.0 || ~7.5.0

    Updates the requirements on phpunit/phpunit to permit the latest version.

    Changelog

    Sourced from phpunit/phpunit's changelog.

    [7.5.20] - 2020-01-08

    Removed

    • eval-stdin.php has been removed, it was not used anymore since PHPUnit 7.2.7

    [7.5.19] - 2020-01-06

    Changed

    • eval-stdin.php can now only be executed with cli and phpdbg

    [7.5.18] - 2019-12-06

    Fixed

    • Fixed #3967: Cannot double interface that extends interface that extends \Throwable
    • Fixed #3968: Test class run in a separate PHP process are passing when exit called inside

    [7.5.17] - 2019-10-28

    Fixed

    • Fixed #3727: Problem hidden by PHPUnit's error handler
    • Fixed #3863: \Countable needs to be checked before \EmptyIterator

    [7.5.16] - 2019-09-14

    Fixed

    • Fixed #3801: Class constant as default parameter is undefined
    • Fixed #3834: Trailing slash breaks code coverage on Windows

    [7.5.15] - 2019-08-21

    Changed

    • Implemented #3765: Use ReflectionType::getName() instead of ReflectionType::__toString() (which is deprecated in PHP 7.4)

    [7.5.14] - 2019-07-15

    Fixed

    • Fixed #3743: EmptyIterator instances are not handled correctly by Count and IsEmpty constraints

    [7.5.13] - 2019-06-19

    Fixed

    • Fixed #3722: getObjectForTrait() does not work for traits that declare a constructor

    ... (truncated)

    Commits
    • 9467db4 Prepare release
    • 0f609d2 Delete eval-stdin.php
    • 4263f76 Prepare release
    • 2076dc7 Enhancement: Use actions/checkout@v2
    • 6aab040 Lets waste three more characters on a solution for a problem that should not ...
    • 33585d9 Hopefully prevent execution of this script in a webserver context.
    • 7a46cf1 Fix: Avoid using master for GitHub actions
    • fcf6c4b Prepare release
    • 2902560 Update ChangeLog
    • 773be5e Ignore .psalm directory on PHPUnit 7.5 branch
    • Additional commits viewable in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Update squizlabs/php_codesniffer requirement from ^2.0 to ^2.0 || ^3.0

    Update squizlabs/php_codesniffer requirement from ^2.0 to ^2.0 || ^3.0

    Updates the requirements on squizlabs/php_codesniffer to permit the latest version.

    Release notes

    Sourced from squizlabs/php_codesniffer's releases.

    3.6.2

    • Processing large code bases that use tab indenting inside comments and strings will now be faster
      • Thanks to Thiemo Kreuz for the patch
    • Fixed bug #3388 : phpcs does not work when run from WSL drives
      • Thanks to Juliette Reinders Folmer and Graham Wharton for the patch
    • Fixed bug #3422 : Squiz.WhiteSpace.ScopeClosingBrace fixer removes HTML content when fixing closing brace alignment
      • Thanks to Juliette Reinders Folmer for the patch
    • Fixed bug #3437 : PSR12 does not forbid blank lines at the start of the class body
      • Added new PSR12.Classes.OpeningBraceSpace sniff to enforce this
    • Fixed bug #3440 : Squiz.WhiteSpace.MemberVarSpacing false positives when attributes used without docblock
      • Thanks to Vadim Borodavko for the patch
    • Fixed bug #3448 : PHP 8.1 deprecation notice while generating running time value
      • Thanks to Juliette Reinders Folmer and Andy Postnikov for the patch
    • Fixed bug #3456 : PSR12.Classes.ClassInstantiation.MissingParentheses false positive using attributes on anonymous class
      • Thanks to Juliette Reinders Folmer for the patch
    • Fixed bug #3460 : Generic.Formatting.MultipleStatementAlignment false positive on closure with parameters
      • Thanks to Juliette Reinders Folmer for the patch
    • Fixed bug #3468 : do/while loops are double-counted in Generic.Metrics.CyclomaticComplexity
      • Thanks to Mark Baker for the patch
    • Fixed bug #3469 : Ternary Operator and Null Coalescing Operator are not counted in Generic.Metrics.CyclomaticComplexity
      • Thanks to Mark Baker for the patch
    • Fixed bug #3472 : PHP 8 match() expression is not counted in Generic.Metrics.CyclomaticComplexity
      • Thanks to Mark Baker for the patch
    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Update jakub-onderka/php-parallel-lint requirement from ^0.9.2 to ^0.9.2 || ^1.0.0

    Update jakub-onderka/php-parallel-lint requirement from ^0.9.2 to ^0.9.2 || ^1.0.0

    Updates the requirements on jakub-onderka/php-parallel-lint to permit the latest version.

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Update league/oauth2-client requirement from ^2.0 to ^2.0 || ^9999999.0

    Update league/oauth2-client requirement from ^2.0 to ^2.0 || ^9999999.0

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies php 
    opened by dependabot[bot] 1
  • User information updated.

    User information updated.

    Update user information to get domain, tax and commercial numbers.

    Current user information response:

    {
      "status": 200,
      "success": true,
      "data": {
        "id": 1689171978,
        "name": "Test User",
        "email": "[email protected]",
        "mobile": "+966555555555",
        "role": "user",
        "created_at": "2021-03-27 21:51:56",
        "merchant": {
          "id": 847769313,
          "username": "User_name123",
          "name": "User Name",
          "avatar": "https://i.ibb.co/jyqRQfQ/avatar-male.webp",
          "store_location": "21.589481104199123,39.67869125586653",
          "plan": "pro",
          "status": "active",
          "domain": "https://www.domain.com",
          "tax_number": "424243241321234",
          "commercial_number": "3552100509",
          "created_at": "2021-12-31 12:59:59"
        }
      }
    }
    
    opened by AtefR 0
Releases(1.4.0)
Owner
Salla
Salla is an e-commerce platform designed to help set up e-commerce stores
Salla
Laravel wrapper around OAuth 1 & OAuth 2 libraries.

Introduction Laravel Socialite provides an expressive, fluent interface to OAuth authentication with Facebook, Twitter, Google, LinkedIn, GitHub, GitL

The Laravel Framework 5.2k Dec 27, 2022
EAuth extension allows to authenticate users by the OpenID, OAuth 1.0 and OAuth 2.0 providers

EAuth extension allows to authenticate users with accounts on other websites. Supported protocols: OpenID, OAuth 1.0 and OAuth 2.0.

Maxim Zemskov 330 Jun 3, 2022
OAuth 1/2 Provider implementations for chillerlan/php-oauth-core. PHP 7.4+

chillerlan/php-oauth-providers Documentation See the wiki for advanced documentation. Requirements PHP 7.4+ a PSR-18 compatible HTTP client library of

chillerlan 4 Dec 2, 2022
This module is intended to provide oauth authentication to freescout.

OAuth FreeScout This module is intended to provide oauth authentication to freescout. Module was tested on keycloak oauth provider with confidential o

Michael Bolsunovskyi 9 Dec 21, 2022
A spec compliant, secure by default PHP OAuth 2.0 Server

PHP OAuth 2.0 Server league/oauth2-server is a standards compliant implementation of an OAuth 2.0 authorization server written in PHP which makes work

The League of Extraordinary Packages 6.2k Jan 4, 2023
This library extends the 'League OAuth2 Client' library to provide OpenID Connect Discovery support for supporting providers that expose a .well-known configuration endpoint.

OpenID Connect Discovery support for League - OAuth 2.0 Client This library extends the League OAuth2 Client library to provide OpenID Connect Discove

null 3 Jan 8, 2022
PHP 5.3+ oAuth 1/2 Client Library

PHPoAuthLib NOTE: I'm looking for someone who could help to maintain this package alongside me, just because I don't have a ton of time to devote to i

David Desberg 1.1k Dec 27, 2022
Middleware to generate access logs for each request using the Apache's access log format

Middleware to generate access logs for each request using the Apache's access log format. This middleware requires a Psr log implementation, for example monolog.

Middlewares 20 Jun 23, 2022
OAuth 1 Client

OAuth 1.0 Client OAuth 1 Client is an OAuth RFC 5849 standards-compliant library for authenticating against OAuth 1 servers. It has built in support f

The League of Extraordinary Packages 907 Dec 16, 2022
OAuth client integration for Symfony. Supports both OAuth1.0a and OAuth2.

HWIOAuthBundle The HWIOAuthBundle adds support for authenticating users via OAuth1.0a or OAuth2 in Symfony. Note: this bundle adds easy way to impleme

Hardware Info 2.2k Dec 30, 2022
Buddy Provider for the OAuth 2.0 Client

Buddy Provider for OAuth 2.0 Client This package provides Buddy OAuth 2.0 support for the PHP League's OAuth 2.0 Client. Installation To install, use

Buddy 0 Jan 19, 2021
The first PHP Library to support OAuth for Twitter's REST API.

THIS IS AN MODIFIED VERSION OF ABRAHAMS TWITTER OAUTH CLASS The directories are structured and the class uses PHP5.3 namespaces. Api.php has a new

Ruud Kamphuis 51 Feb 11, 2021
The most popular PHP library for use with the Twitter OAuth REST API.

TwitterOAuth The most popular PHP library for Twitter's OAuth REST API. See documentation at https://twitteroauth.com. PHP versions listed as "active

Abraham Williams 4.2k Dec 23, 2022
Limit access to your Laravel applications by using invite codes

Doorman Doorman provides a way to limit access to your Laravel applications by using invite codes. Invite Codes: Can be tied to a specific email addre

Ashley Clarke 964 Dec 31, 2022
Easy integration with OAuth 2.0 service providers.

OAuth 2.0 Client This package provides a base for integrating with OAuth 2.0 service providers. The OAuth 2.0 login flow, seen commonly around the web

The League of Extraordinary Packages 3.4k Dec 31, 2022
An OAuth 2.0 bridge for Laravel and Lumen [DEPRECATED FOR LARAVEL 5.3+]

OAuth 2.0 Server for Laravel (deprecated for Laravel 5.3+) Note: This package is no longer maintaned for Laravel 5.3+ since Laravel now features the P

Luca Degasperi 2.4k Jan 6, 2023
Kaiju is an open source verification bot based on Discord's OAuth written in C# and PHP, with the functionality of being able to integrate the user to a new server in case yours is suspended.

What is Kaiju? Kaiju is an open source verification bot for Discord servers, based on OAuth and with permission for the server owner, to be able to mi

in the space 10 Nov 20, 2022
A Laravel 5 package for OAuth Social Login/Register implementation using Laravel socialite and (optionally) AdminLTE Laravel package

laravel-social A Laravel 5 package for OAuth Social Login/Register implementation using Laravel socialite and (optionally) AdminLTE Laravel package. I

Sergi Tur Badenas 42 Nov 29, 2022
OAuth Service Provider for Laravel 4

OAuth wrapper for Laravel 4 oauth-4-laravel is a simple laravel 4 service provider (wrapper) for Lusitanian/PHPoAuthLib which provides oAuth support i

Dariusz Prząda 693 Sep 5, 2022