toshipon / oauth-php

Automatically exported from code.google.com/p/oauth-php
MIT License
0 stars 0 forks source link

Get client ID or consumer_key from OAuthRequestVerifier #26

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Implement a function to get the application ID or the consumer_key from
OAuthRequestVerifier

 $req = new OAuthRequestVerifier();
 $registeredClient = $req->verify();

 $user_id = $registeredClient['user_id'];
 $consumer_key = $registeredClient['consumer_key'];
 $app_id = $registeredClient['id'];

So that someone can get the client information when "Checking A Request For
Authorization" [http://code.google.com/p/oauth-php/wiki/ServerHowTo]

Original issue reported on code.google.com by fiedler....@gmail.com on 10 Feb 2010 at 11:56

GoogleCodeExporter commented 9 years ago
This is a nice idea, but changing verify() would break compatibility with 
existing
code. I created a new OAuthRequestVerifier::verifyExtended() method that 
returns this
extra data, an array('user_id' => xxx, 'consumer_key' => yyyy).

If you need more data than this (the id, for instance), use 
OAuthServer::getServer(). 

Original comment by brunobg%...@gtempaccount.com on 18 Feb 2010 at 5:01

GoogleCodeExporter commented 9 years ago
thx! this cool, now i know witch application wants to perform a action. That´s 
really
cool.

Original comment by fiedler....@gmail.com on 19 Feb 2010 at 2:15