Giter Club home page Giter Club logo

oauth-consumer's People

Contributors

flijten avatar tlhunter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

oauth-consumer's Issues

OAuthProvider class not found

hi, i use this tutorial to began my journey with OAuth -> http://www.freeklijten.nl/home/2011/10/19/Writing-an-OAuth-Provider-in-PHP

i follow the instructions step by step, but when i try to generate consumer key and secret key, i stuck by this error :
"
Fatal error: Class 'OAuthProvider' not found in D:\xampp\htdocs\gutasaputra\OAuth-1\src\OAuthProviderWrapper.php on line 92 "

i search OAuthProvider class in the source code that you gave, but i cant find nothing. can you tell me how to fix this one?

thanks

consumerHandler / timestampNonceHandler never called

I have used the provider example in my project, but the functions "consumerHandler" / "timestampNonceHandler" are never called, when calling : $provider->checkOAuthRequest().
Here is my code :

public function request_token()
{
    $provider = new \OAuthProvider();

    $provider->consumerHandler([$this,'consumerHandler']);
    $provider->timestampNonceHandler([$this,'timestampNonceHandler']);
    $provider->isRequestTokenEndpoint(true);

    $provider->setConsumerKey(self::$consumerClep);
    $response = $provider->checkOAuthRequest();
    if ($response !== true)
    { 
        echo $response;
        return;
    }
    // ...
}

public function consumerHandler($provider)
{
    //Consumer Handler
}

public function timestampNonceHandler($provider)
{
    //Timestamp Nonce Handler
}

Can someone explain me why "checkOAuthRequest" doesn't call the handlers ? Or am I using oauth incorrectly ?

Thank you very much

DataStoreReadException: Couldn't create the request token data

I get the following error when attempting to perform the handshake with the provided example code. I had done all the steps up to that point correctly.

http://oauth.local/example/consumer/get_request_token.php

array(1) {
  '
Fatal_error:_Uncaught_exception_\'DataStoreReadException\'_with_message_\'Couldn\'t_create_the_request_token_data_in_the_datastore\'_in_/Volumes/Server/copy/oauth/src/model/OAuthRequestTokenModel_php_on_line_143

DataStoreReadException:_Couldn\'t_create_the_request_token_data_in_the_datastore_in_/Volumes/Server/copy/oauth/src/model/OAuthRequestTokenModel_php_on_line_143

Call_Stack:
____0_0002_____248288___1__{main}()_/Volumes/Server/oauth/src/example/provider/request_token_php:0
____0_0073_____413464___2__OAuthProviderWrapper->outputRequestToken()_/Volumes/Server/oauth/src/example/provider/request_token_php:16
____0_0084_____467664___3__ModelBase->save()_/Volumes/Server/oauth/src/OAuthProviderWrapper_php:114
____0_0084_____467784___4__OAuthRequestTokenModel->create()_/Volumes/Server/oauth/src/model/ModelBase_php:68

' =>
  string(0) ""
}

While hunting around, it looks like OAuthRequestTokenModel::create() is attempting to perform a MySQL INSERT, but the value of $this->tokenUserId is empty, and that query fails. Any thoughts as to what the issue could be?

PHP 5.4.11
MySQL 5.6.10

Can't insert nonce into database

When we call the timestampNonceHandler method (OAuthProviderWrapper), the save method (OAuthNonceModel which extends ModelBase) was executed with a id (= the nonce) defined.

So, finally, we will call the update method (OAuthNonceModel) in place of the create method.

I think, it's a bug ?

Sorry for my bad english :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.