OAuth 1 Client

Overview

OAuth 1.0 Client

Latest Stable Version Software License Build Status Coverage Status Quality Score Total Downloads

OAuth 1 Client is an OAuth RFC 5849 standards-compliant library for authenticating against OAuth 1 servers.

It has built in support for:

  • Bitbucket
  • Magento
  • Trello
  • Tumblr
  • Twitter
  • Uservoice
  • Xing

Adding support for other providers is trivial. The library requires PHP 7.1+ and is PSR-2 compatible.

Third-Party Providers

If you would like to support other providers, please make them available as a Composer package, then link to them below.

These providers allow integration with other providers not supported by oauth1-client. They may require an older version so please help them out with a pull request if you notice this.

Terminology (as per the RFC 5849 specification):

client
    An HTTP client (per [RFC2616]) capable of making OAuth-
    authenticated requests (Section 3).

server
    An HTTP server (per [RFC2616]) capable of accepting OAuth-
    authenticated requests (Section 3).

protected resource
    An access-restricted resource that can be obtained from the
    server using an OAuth-authenticated request (Section 3).

resource owner
    An entity capable of accessing and controlling protected
    resources by using credentials to authenticate with the server.

credentials
    Credentials are a pair of a unique identifier and a matching
    shared secret.  OAuth defines three classes of credentials:
    client, temporary, and token, used to identify and authenticate
    the client making the request, the authorization request, and
    the access grant, respectively.

token
    A unique identifier issued by the server and used by the client
    to associate authenticated requests with the resource owner
    whose authorization is requested or has been obtained by the
    client.  Tokens have a matching shared-secret that is used by
    the client to establish its ownership of the token, and its
    authority to represent the resource owner.

The original community specification used a somewhat different
terminology that maps to this specifications as follows (original
community terms provided on left):

Consumer:  client

Service Provider:  server

User:  resource owner

Consumer Key and Secret:  client credentials

Request Token and Secret:  temporary credentials

Access Token and Secret:  token credentials

Install

Via Composer

$ composer require league/oauth1-client

Usage

Bitbucket

$server = new League\OAuth1\Client\Server\Bitbucket([
    'identifier' => 'your-identifier',
    'secret' => 'your-secret',
    'callback_uri' => "http://your-callback-uri/",
]);

Trello

$server =  new League\OAuth1\Client\Server\Trello([
    'identifier' => 'your-identifier',
    'secret' => 'your-secret',
    'callback_uri' => 'http://your-callback-uri/',
    'name' => 'your-application-name', // optional, defaults to null
    'expiration' => 'your-application-expiration', // optional ('never', '1day', '2days'), defaults to '1day'
    'scope' => 'your-application-scope' // optional ('read', 'read,write'), defaults to 'read'
]);

Tumblr

$server = new League\OAuth1\Client\Server\Tumblr([
    'identifier' => 'your-identifier',
    'secret' => 'your-secret',
    'callback_uri' => "http://your-callback-uri/",
]);

Twitter

$server = new League\OAuth1\Client\Server\Twitter([
    'identifier' => 'your-identifier',
    'secret' => 'your-secret',
    'callback_uri' => "http://your-callback-uri/",
]);

Xing

$server = new League\OAuth1\Client\Server\Xing([
    'identifier' => 'your-consumer-key',
    'secret' => 'your-consumer-secret',
    'callback_uri' => "http://your-callback-uri/",
]);

Showing a Login Button

To begin, it's advisable that you include a login button on your website. Most servers (Twitter, Tumblr etc) have resources available for making buttons that are familiar to users. Some servers actually require you use their buttons as part of their terms.

<a href="authenticate.php">Login With Twitter</a>

Retrieving Temporary Credentials

The first step to authenticating with OAuth 1 is to retrieve temporary credentials. These have been referred to as request tokens in earlier versions of OAuth 1.

To do this, we'll retrieve and store temporary credentials in the session, and redirect the user to the server:

// Retrieve temporary credentials
$temporaryCredentials = $server->getTemporaryCredentials();

// Store credentials in the session, we'll need them later
$_SESSION['temporary_credentials'] = serialize($temporaryCredentials);
session_write_close();

// Second part of OAuth 1.0 authentication is to redirect the
// resource owner to the login screen on the server.
$server->authorize($temporaryCredentials);

The user will be redirected to the familiar login screen on the server, where they will login to their account and authorise your app to access their data.

Retrieving Token Credentials

Once the user has authenticated (or denied) your application, they will be redirected to the callback_uri which you specified when creating the server.

Note, some servers (such as Twitter) require that the callback URI you specify when authenticating matches what you registered with their app. This is to stop a potential third party impersonating you. This is actually part of the protocol however some servers choose to ignore this.

Because of this, we actually require you specify a callback URI for all servers, regardless of whether the server requires it or not. This is good practice.

You'll need to handle when the user is redirected back. This will involve retrieving token credentials, which you may then use to make calls to the server on behalf of the user. These have been referred to as access tokens in earlier versions of OAuth 1.

if (isset($_GET['oauth_token']) && isset($_GET['oauth_verifier'])) {
    // Retrieve the temporary credentials we saved before
    $temporaryCredentials = unserialize($_SESSION['temporary_credentials']);

    // We will now retrieve token credentials from the server
    $tokenCredentials = $server->getTokenCredentials($temporaryCredentials, $_GET['oauth_token'], $_GET['oauth_verifier']);
}

Now, you may choose to do what you need with the token credentials. You may store them in a database, in the session, or use them as one-off and then forget about them.

All credentials, (client credentials, temporary credentials and token credentials) all implement League\OAuth1\Client\Credentials\CredentialsInterface and have two sets of setters and getters exposed:

var_dump($tokenCredentials->getIdentifier());
var_dump($tokenCredentials->getSecret());

In earlier versions of OAuth 1, the token credentials identifier and token credentials secret were referred to as access token and access token secret. Don't be scared by the new terminology here - they are the same. This package is using the exact terminology in the RFC 5849 OAuth 1 standard.

Twitter will send back an error message in the denied query string parameter, allowing you to provide feedback. Some servers do not send back an error message, but rather do not provide the successful oauth_token and oauth_verifier parameters.

Accessing User Information

Now you have token credentials stored somewhere, you may use them to make calls against the server, as an authenticated user.

While this package is not intended to be a wrapper for every server's API, it does include basic methods that you may use to retrieve limited information. An example of where this may be useful is if you are using social logins, you only need limited information to confirm who the user is.

The four exposed methods are:

// User is an instance of League\OAuth1\Client\Server\User
$user = $server->getUserDetails($tokenCredentials);

// UID is a string / integer unique representation of the user
$uid = $server->getUserUid($tokenCredentials);

// Email is either a string or null (as some providers do not supply this data)
$email = $server->getUserEmail($tokenCredentials);

// Screen name is also known as a username (Twitter handle etc)
$screenName = $server->getUserScreenName($tokenCredentials);

League\OAuth1\Client\Server\User exposes a number of default public properties and also stores any additional data in an extra array - $user->extra. You may also iterate over a user's properties as if it was an array, foreach ($user as $key => $value).

Examples

Examples may be found under the resources/examples directory, which take the usage instructions here and go into a bit more depth. They are working examples that would only you substitute in your client credentials to have working.

Testing

$ phpunit

Contributing

Please see CONTRIBUTING for details.

Credits

License

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

Comments
  • Version-2 for PHP7.2+ featuring Guzzle-7

    Version-2 for PHP7.2+ featuring Guzzle-7

    An attempt to make this package PHP7.2+ compatible, featuring the latest versions of its dependencies as possible.

    • Cleaned up (without any change to logic, but with minor implementation fixes) the codebase making it PHP7 and PSR0 compat.
    • Updated the tests in a very minor way, to reflect return-type expectations to align with Guzzle-7 classes
    • Updated Travis-CI flow: disabled Scrutinizer as it somehow doesn't work with PHP7, which can be fixed later
    • Added Docker Compose setup for development purposes which features OOTB Xdebug setup (port 54321, ideKey=basisPhp). Container used is from another OS project of mine, but can be replaced later on, when something specific to this project or League gets created.
    • Updated composer dependencies to the latest version (as possible).
    • Dropped PHP-CodeSniffer in favor of Php-Cs-Fixer. Maybe later Psalm can be added, when typing issues are completely resolved.

    Expectations from this PR:

    • To have a 2.0 release with PHP7.2+ only support.

    Further notes:

    • Recommend to refactor existing "Version-2" branch on top of this one, for possible 3.0 release.
    • Although Guzzle-7 works fine in this PR, in future, PSR-18 implementation should be brought forward to decouple from Guzzle.
    • Some online coverage service should be added as part of CI. Scrutinizer is really behind (I used it in past as well, in my other projects)
    opened by shehi 20
  • [PHP 8] Warning on EncodesUrl

    [PHP 8] Warning on EncodesUrl

    The following PHP warning is generated under PHP 8:

    League/OAuth1/Client/Signature/HmacSha1Signature::League/OAuth1/Client/Signature/{closure}(): 
    Argument #2 ($value) must be passed by reference, value given in 
    /vendor/league/oauth1-client/src/Signature/EncodesUrl.php on line 54
    

    Seems to be caused by the second parameter being passed as a reference. Removing the '&' symbol from value seems to work for me, but I don't know if there are greater implications outside of my particular use case.

    opened by mattkingshott 17
  • Updated dependency in composer.json to use guzzlehttp/guzzle instead of guzzle/guzzle

    Updated dependency in composer.json to use guzzlehttp/guzzle instead of guzzle/guzzle

    laravel/socialite and others depending on this package display

    Package guzzle/guzzle is abandoned, you should avoid using it. Use guzzlehttp/guzzle instead.

    so I've update the guzzle dependency.

    Tests seem to run just fine

    gabriel@~:oauth1-client (git:master) $ phpunit
    PHPUnit 4.8.26 by Sebastian Bergmann and contributors.
    Warning:    The Xdebug extension is not loaded
            No code coverage will be generated.
    
    .....................................
    
    Time: 212 ms, Memory: 8.75MB
    
    OK (37 tests, 114 assertions)
    
    opened by pendexgabo 12
  • Breaking change for v1.8.0

    Breaking change for v1.8.0

    Hi all! I'm not sure what's considered the public API of this package, but the most recent update has broken the socialiteproviders/providers package which allows social logins in Laravel. It'll also have broken any custom OAuth providers which extend the League\OAuth1\Client\Server\Server class, due to the typehinting of the methods.

    In this particular case, it's made more problematic by the fact that Laravel socialite defines its own user to return, so the typehintinh for getUserDetails cannot be met without changes in several repositories.

    Was this release meant as a minor release, or should it be upgraded to a major to stop any existing extensions being broken?

    opened by tobytwigger 11
  • Next Version

    Next Version

    This PR serves as the basis for an entire rewrite of this package. The previous version has been around for a very long time and is quite long in the tooth.

    Key improvements over the older version are:

    1. The overall architecture in the older version leads to a lot of duplication in tests and our tests are in fact often not really testing anything meaningful.
    2. After re-reading the spec, there are a couple of areas where we currently don't correctly address creating an OAuth signature. Obviously this works for most folks, however there's some edge cases which we don't account for. Upon searching the web for other OAuth 1 packages, it appears nobody (that I've seen) accounts for these. An example is where the same parameter is found in both the request body and the query string. Both instances should be used for generating the OAuth signature. The new version accounts for this.
    3. The creation of additional providers which customise functionality was painful in the previous iteration. By utilising PSR-7, PSR-17 and PSR-18, providers have a lot more flexibility to setup unique requests if they need to instead of overriding a lot of functionality.
    4. Again, with the addition of PSR, we have decoupled from requiring specific Guzzle versions. We suggest Guzzle as a perfect partner for this package, however our only dependency is an implementation of the relevant PSRs as well as a Guzzle support package for handling RFC 3986 encoding/decoding. The final iteration of this package may remove that dependency.
    5. The rewrite express a Generic Provider, which any OAuth1-compliant server should work with. We will likely remove all additional providers by extracting them into external packages (up for debate) and supply only the Generic Provider out of the box.
    6. The rewrite has extensive unit test coverage with many scenarios in key areas, such as signature generation and OAuth flow. We have taken examples right out the OAuth spec and plugged them into our tests to ensure that we catch the edge cases exposed by the spec. We also have 100% code coverage, obviously 😉.

    To do:

    • [ ] Decide if we extract providers out and ship with only a Generic Provider, or do we ship with the same providers as the old version? Thoughts: maybe we ship with the most common ones. Some less common ones like Magento 1 introduce the requirement of XML-based PHP extensions being dependencies…
    • [ ] Write up detailed documentation with usage examples.
    • [ ] Add a handy Guzzle middleware to sign authenticated OAuth 1 requests, or recommend the usage of the official OAuth subscriber.
    • [ ] Decide what properties to officially support on the User object. At the time of writing, we support id, email, username and all other data is provider-specific and is accessible via the user's metadata array.
    • [ ] Explore adding integrations/bridges (likely in separate repositories) for common frameworks such as Laravel/Symfony.
    opened by bencorlett 10
  • [2.0] Code abstraction, improved exception management, api changes similar to oauth2-client

    [2.0] Code abstraction, improved exception management, api changes similar to oauth2-client

    This PR started very small and only encompassed a bit of code abstraction and the creation of utility classes. The longer it sat waiting, the more refactoring I did. Now it has addressed #28 and #20 of the 2.0 milestone.

    cc @bencorlett

    These changes support the following public usage of the package:

    // Create a server instance.
    $server = new \League\OAuth1\Client\Server\GenericServer([
        'identifier'              => 'your-identifier',
        'secret'                  => 'your-secret',
        'callbackUri'             => 'http://your-callback-uri/',
        // These are only required for use with GenericServer
        'responseType'            => 'json', // Optional, defaults to 'json'
        'temporaryCredentialsUri' => 'http://your.service/temporary-credentials',
        'authorizationUri'        => 'http://your.service/authorize',
        'tokenCredentialsUri'     => 'http://your.service/token-credentials',
        'resourceOwnerDetailsUri' => 'http://your.service/me',
    ]);
    
    // Obtain Temporary Credentials and User Authorization
    if (!isset($_GET['oauth_token'], $_GET['oauth_verifier'])) {
    
        // First part of OAuth 1.0 authentication is to
        // obtain Temporary Credentials.
        $temporaryCredentials = $server->getTemporaryCredentials();
    
        // Store credentials in the session, we'll need them later
        $_SESSION['temporary_credentials'] = serialize($temporaryCredentials);
        session_write_close();
    
        // Second part of OAuth 1.0 authentication is to obtain User Authorization
        // by redirecting the resource owner to the login screen on the server.
        // Create an authorization url.
        $authorizationUrl = $server->getAuthorizationUrl($temporaryCredentials);
    
        // Redirect the user to the authorization URL. The user will be redirected
        // to the familiar login screen on the server, where they will login to
        // their account and authorize your app to access their data.
        header('Location: ' . $authorizationUrl);
        exit;
    
    // Obtain Token Credentials
    } else {
    
        try {
    
            // Retrieve the temporary credentials we saved before.
            $temporaryCredentials = unserialize($_SESSION['temporary_credentials']);
    
            // We will now obtain Token Credentials from the server.
            $tokenCredentials = $server->getTokenCredentials(
                $temporaryCredentials,
                $_GET['oauth_token'],
                $_GET['oauth_verifier']
            );
    
            // We have token credentials, which we may use in authenticated
            // requests against the service provider's API.
            echo $tokenCredentials->getIdentifier() . "\n";
            echo $tokenCredentials->getSecret() . "\n";
    
            // Using the access token, we may look up details about the
            // resource owner.
            $resourceOwner = $server->getResourceOwner($tokenCredentials);
    
            var_export($resourceOwner->toArray());
    
            // The server provides a way to get an authenticated API request for
            // the service, using the access token; it returns an object conforming
            // to Psr\Http\Message\RequestInterface.
            $request = $server->getAuthenticatedRequest(
                'GET',
                'http://your.service/endpoint',
                $tokenCredentials
            );
    
        } catch (\League\OAuth1\Client\Exceptions\Exception $e) {
    
            // Failed to get the token credentials or user details.
            exit($e->getMessage());
    
        }
    
    }
    
    opened by stevenmaguire 10
  • Multidimensional arrays

    Multidimensional arrays

    When sending multidimensional array data through the client, you will get this error:

    rawurlencode() expects parameter 1 to be string, array given
    

    Is this a bug, or is this spec related?

    opened by jenssegers 10
  • [2.0] Move providers to separate projects

    [2.0] Move providers to separate projects

    @bencorlett Now that the develop branch is fresh with some of the new architecture I wanted to bring up the topic of moving the provider implementations to independent repositories. I noticed that there are some empty repos within thephpleague organization. Were those created with this purpose in mind?

    • [x] oauth1-twitter maintained by @bencorlett
    • [x] oauth1-trello maintained by @stevenmaguire
    • [x] oauth1-bitbucket maintained by @stevenmaguire
    • [ ] oauth1-xing
    • [ ] oauth1-uservoice
    • [ ] oauth1-tumblr
    • [ ] oauth1-magento

    I am happy to assume responsibility for a few of them to get the ball rolling. I'd prefer to take trello, tumblr, twitter, and bitbucket, as I have experience with those APIs.

    What are your thoughts?

    opened by stevenmaguire 9
  • Make `oauth_callback_confirmed` optional

    Make `oauth_callback_confirmed` optional

    I'm working with an API (goodreads) that doesn't appear to be honouring it.

    The check can be found here: https://github.com/thephpleague/oauth1-client/blob/4d4edd9b6014f882e319231a9b3351e3a1dfdc81/src/Client/Server/Server.php#L432

    (Also worth noting is that the exception message being shown here could be a bit more descriptive.)

    opened by atrauzzi 8
  • Add buildUrl method to Server class

    Add buildUrl method to Server class

    I am currently working on a OAuth 1 Server to be used in conjunction with this library. The OAuth provider allows for custom meta data to be passed to the authorization url with query string parameters.

    The current behavior of this class is such that it blindly concatenates the urlAuthorization() and http_build_query($parameters) with a ? character separator.

    I am proposing a change that adds a buildUrl method to the Server class. This method will now be used in the getAuthorizationUrl() method to return the complete authorization url.

    With this change in place new Server implementations can declare urls that include query string parameters that will not break when the base Server class appends the oauth_token.

        /**
         * {@inheritDoc}
         */
        public function urlAuthorization()
        {
            return 'http://www.example.com/authorize?foo=bar';
        }
        //http://www.example.com/authorize?foo=bar&oauth_token=abcdefg
    
        /**
         * {@inheritDoc}
         */
        public function urlAuthorization()
        {
            return 'http://www.example.com/authorize';
        }
        //http://www.example.com/authorize?oauth_token=abcdefg
    
    opened by stevenmaguire 8
  • Query strings with arrays cannot be properly signed

    Query strings with arrays cannot be properly signed

    I've encountered an issue whereby if you create a service that extends League\OAuth1\Client\Server\Server and use $this->getHeaders(...) with a query string that has array notation (i.e. var[]=whatever) then the URL cannot be properly signed.

    Here's an example:

    $this->getHeaders($this->tokenCredentials, 'GET', 'https://myservice.com/hello?a=1&b=2&c[]=3&c[]=4&d[a]=5&d[b]=6');
    

    This generates a warning: Warning: rawurlencode() expects parameter 1 to be string, array given in /my/proj/vendor/league/oauth1-client/src/Client/Signature/HmacSha1Signature.php on line 66

    Which means that the service is sending an invalid signature.

    When I dug deeper, it looks like the method League\OAuth1\Client\Signature\HmacSha1Signature::baseString does not properly operate on such nested arrays. Specifically this line: $data[rawurlencode($key)] = rawurlencode($value);. The method rawurlencode doesn't know how to act on an array.

    Is this a bug or did I miss another way to sign a URL here?

    Client version: 1.6.1

    php -a
    Interactive shell
    
    php > parse_str('a=1&b=2&c[]=3&c[]=4&d[a]=5&d[b]=6', $query);
    php > var_dump($query);
    array(4) {
      ["a"]=>
      string(1) "1"
      ["b"]=>
      string(1) "2"
      ["c"]=>
      array(2) {
        [0]=>
        string(1) "3"
        [1]=>
        string(1) "4"
      }
      ["d"]=>
      array(2) {
        ["a"]=>
        string(1) "5"
        ["b"]=>
        string(1) "6"
      }
    }
    php > foreach ($query as $key => $val) { var_dump(rawurlencode($key), rawurlencode($val)); }
    string(1) "a"
    string(1) "1"
    string(1) "b"
    string(1) "2"
    
    Warning: rawurlencode() expects parameter 1 to be string, array given in php shell code on line 1
    string(1) "c"
    NULL
    
    Warning: rawurlencode() expects parameter 1 to be string, array given in php shell code on line 1
    string(1) "d"
    NULL
    php > 
    
    opened by nicktacular 7
  • Fix base string generation for array params

    Fix base string generation for array params

    Problem

    When duplicate params are passed (like ['test' => [ '123', '456' ]]), the signature should not add numeric indices to the generated base string.

    The default behavior of EncodesUrl::baseString() is to parse the URL query string using parse_str. This works well for most cases, but in the case where clients repeat param names with different values (which is valid and accounted for in RFC 5849 Section 3.4.1.3.2 item 2) it does not work properly.

    // Loses all but last value when duplicate params are included, signature generation will fail
    parse_str('test=1234&test=5678', $params); // [ 'test' => '5678' ]
    
    // Strips index from param name, indices need to be re-added during signature generation.
    // One version of the other will fail. Currently, the first form can not be properly signed.
    parse_str('test[]=1234&test[]=5678', $params); // [ 'test' => [ '1234', '5678' ] ]
    parse_str('test[0]=1234&test[1]=5678', $params); // [ 'test' => [ '1234', '5678' ] ]
    

    The Guzzle PSR-7 package provides Query::parse() that can handle query strings containing duplicate params. Calling code can strip the query string from the passed URL and the baseString() method can receive these as additional parameters:

    // no information lost using Guzzle PSR-7
    $params = Query::parse('test=1234&test=5678'); // [ 'test' => [ '1234', '5678' ] ]
    $params = Query::parse('test[]=1234&test[]=5678'); // [ 'test[]' => [ '1234', '5678' ] ]
    $params = Query::parse('test[0]=1234&test[1]=5678'); // [ 'test[0]' => '1234', 'test[1]' => '5678' ]
    
    $oauthParams = ... ;
    $queryParams = Query::parse($uri->getQuery(), PHP_QUERY_RFC3986);
    $signature->sign((string) $uri->withQuery(''), array_merge($oauthParams, $queryParams), 'GET');
    

    This should work, but the base string generation adds additional index numbers to the param name, causing signature generation to fail:

    // correct
    &test=1234&test=5678
    
    // incorrect
    &test[0]=1234&test[1]=5678
    

    Solution

    This PR changes the following:

    1. When additional params are passed, sequential arrays do not get bracket suffixes added to param names. This allows the existing parse_str to work as before, but also allows using another library (like Guzzle) to parse query params and pass them in to baseString().
    2. Params are sorted before being imploded. Sorting is done after the key-value pair strings are generated so it will sort first by param name and then by param value as per the RFC.

    A new protected method paramsFromData() is added. The existing protected method queryStringFromData() is maintained, although it is now unused.

    Background

    Why does this matter? Multi-value parameters are an edge case, and for folks who can control all sides of the request signing, they can work within the confines of parse_str or modify requests to work. Folks attempting to integrate with producers/consumers using spec-compliant implementations written in other languages can't make these changes, and need this implementation to work per the RFC.

    opened by gauthierm 0
  • SignatureInterface is not correctly imported after recent Twitter server changes

    SignatureInterface is not correctly imported after recent Twitter server changes

    https://github.com/thephpleague/oauth1-client/commit/0a423aa9a3c7d1c7a8f3befd38acfff2ad972803#diff-23c1737a2e9df0d80059154c9a7878c3d6e59fd5bb93ad1966c2f01293a5398cR19

    SignatureInterface is located in another directory and it should be imported like:

    use League\OAuth1\Client\Signature\SignatureInterface;
    
    opened by jmalinens 0
  • Trello

    Trello "An unknown application"

    Calling the class with parameter name don't seems to apply it to Trello.

    $Trello = new Trello([
                'identifier' => c('TRELLO_KEY'),
                'secret' => c('TRELLO_SECRET'),
                'callback_uri' => Http::url(),
                'name' => c('APP_NAME'),
                'expiration' => 'never',
                'scope' => 'read,write'
            ]);
    

    The value of APP_NAME get passed in the URL, but the result on the Trello auth-page is "An unknown application" instead of the expected value.

    opened by alegag 2
  • Guzzle HTTP Client configuration

    Guzzle HTTP Client configuration

    I really want to pass the configuration to Guzzle HTTP Client for setting timeout, and I have a proposal for that.

    Add $clientOptions to the constructor of /src/Client/Server/Server.php

    abstract class Server
    {
        /**
         * @var array
         */
        protected $clientOptions;
    
        /**
         * Create a new server instance.
         *
         * @param ClientCredentialsInterface|array $clientCredentials
         * @param SignatureInterface               $signature
         * @param array  $clientOptions
         */
        public function __construct($clientCredentials, SignatureInterface $signature = null, $clientOptions)
    
    opened by hareku 1
Releases(v1.10.0)
Owner
The League of Extraordinary Packages
A group of developers who have banded together to build solid, well tested PHP packages using modern coding standards.
The League of Extraordinary Packages
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
The Salla OAuth Client library is designed to provide client applications with secure delegated access to Salla Merchant stores.

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

Salla 14 Nov 27, 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
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
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
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
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
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
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
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 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
OAuth Service Provider for Laravel 5

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

null 2 Sep 19, 2018
Social OAuth Authentication for Laravel 5. drivers: facebook, github, google, linkedin, weibo, qq, wechat and douban

Social OAuth Authentication for Laravel 5. drivers: facebook, github, google, linkedin, weibo, qq, wechat and douban

安正超 330 Nov 14, 2022
Twitter OAuth API for PHP 5.3+

README The Wid'op OAuth library is a modern PHP 5.3+ API allowing you to easily obtain a Twitter access token. For now, it supports OAuth Web & Applic

Wid'op 8 Dec 11, 2020