Page 1 of 1

OAuth 2 framework for OPS v 3.1

Posted: Wed Aug 28, 2013 8:32 am
by rblo
I need some help to use the OAuth 2 framework in my OPS software, implemented with cUrl calls in PHP.

Which OAuth.php library can I use?
How does the mechanism to gain the accestoken, looks like.

I've tried:
==========================================================================
require_once('OAuth.php');
...
$CONSUMER_KEY=".......";
$CONSUMER_SECRET=".........";
$consumer=new OAuthConsumer($CONSUMER_KEY, $CONSUMER_SECRET);
...
$request = OAuthRequest::from_consumer_and_token($consumer, NULL, 'GET', $rest_url, NULL);
$request->sign_request(new OAuthSignatureMethod_HMAC_SHA1(), $consumer, NULL);
$auth_header = $request->to_header();
....
curl_setopt($curl, CURLOPT_FAILONERROR, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_HTTPHEADER, array($auth_header));
...
$result=curl_exec($curl);
====================================================================

Re: OAuth 2 framework for OPS v 3.1

Posted: Wed Aug 28, 2013 3:29 pm
by EPO / OPS Support
Dear user,

Please read OPS documentation, 2.3.3. Authentication & Access Token handling : http://www.epo.org/searching/free/ops/d ... ation.html

Kind regards,

OPS support