Skip to content

Commit

Permalink
Fix capitalisation of OAuth1.
Browse files Browse the repository at this point in the history
  • Loading branch information
drsdre committed Feb 15, 2017
1 parent 1f6276d commit dcdc3b0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Client for communicating with a Wordpress Rest API interface (standard included from Wordpress 4.7 on).
*
* Authentication can either be done using:
* - oAuth1 plugin, see drsdre\WordpressApi\Oauth1.php
* - oAuth1 plugin, see drsdre\WordpressApi\OAuth1.php
* - Basic Authentication with user/password (not recommended for live) see https://github.com/WP-API/Basic-Auth.
* See http://v2.wp-api.org/guide/authentication/
*
Expand Down Expand Up @@ -102,7 +102,7 @@ public function init() {
if ( empty( $this->client_key ) && empty( $this->client_secret ) || empty( $this->access_token ) ) {
if ( empty( $this->username ) || empty( $this->password ) ) {
throw new InvalidConfigException(
'Either specify client_key, client_secret & access_token for Oauth1 [production] ' .
'Either specify client_key, client_secret & access_token for OAuth1 [production] ' .
'or username and password for basic auth [development only].' );
}

Expand All @@ -121,7 +121,7 @@ public function init() {
$token->setParams( $this->access_token );

// Start a WordpressAuth session
$this->client = new Oauth1( [
$this->client = new OAuth1( [
'accessToken' => $token,
'consumerKey' => $this->client_key,
'consumerSecret' => $this->client_secret,
Expand Down Expand Up @@ -330,7 +330,7 @@ public function asRaw() {
* @return yii\httpclient\Request
*/
protected function createAuthenticatedRequest() {
if ( is_a( $this->client, 'drsdre\WordpressApi\Oauth1' ) ) {
if ( is_a( $this->client, 'drsdre\WordpressApi\OAuth1' ) ) {
// oAuth1 request
$request = $this->client
->createApiRequest();
Expand Down

0 comments on commit dcdc3b0

Please sign in to comment.