daviddesberg / PHPoAuthLib

PHP 5.3+ oAuth 1/2 Client Library
Other
1.09k stars 456 forks source link

Implemented HMAC-SHA256 signature support to OAuth1. #594

Open jeroenvermeulen opened 10 months ago

jeroenvermeulen commented 10 months ago

Example usage:

class OauthClient extends \OAuth\OAuth1\Service\AbstractService
{
    public function __construct(
        Credentials $credentials,
        ClientInterface $httpClient = null,
        TokenStorageInterface $storage = null,
        SignatureInterface $signature = null,
        UriInterface $baseApiUri = null
    ) {
        $this->setSignatureMethod('HMAC-SHA256');  // <== THIS
        parent::__construct($credentials, $httpClient, $storage, $signature, $baseApiUri);
    }
}