Hello community,
here is the log from the commit of package php5-pear-Horde_Oauth for
openSUSE:Factory checked in at 2015-01-20 19:02:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/php5-pear-Horde_Oauth (Old)
and /work/SRC/openSUSE:Factory/.php5-pear-Horde_Oauth.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "php5-pear-Horde_Oauth"
Changes:
--------
---
/work/SRC/openSUSE:Factory/php5-pear-Horde_Oauth/php5-pear-Horde_Oauth.changes
2012-11-28 14:54:03.000000000 +0100
+++
/work/SRC/openSUSE:Factory/.php5-pear-Horde_Oauth.new/php5-pear-Horde_Oauth.changes
2015-01-20 19:02:44.000000000 +0100
@@ -1,0 +2,13 @@
+Sun Jan 18 11:40:38 UTC 2015 - Ralf Lang <[email protected]>
+
+- Version 2.0.2
+
+- [jan] Add Composer definition.
+
+-------------------------------------------------------------------
+Wed Jan 9 16:40:40 UTC 2013 - Ralf Lang <[email protected]>
+
+- Version 2.0.1
+- [jan] Re-packaged 2.0.0 release.
+
+-------------------------------------------------------------------
Old:
----
Horde_Oauth-2.0.0.tgz
New:
----
Horde_Oauth-2.0.2.tgz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ php5-pear-Horde_Oauth.spec ++++++
--- /var/tmp/diff_new_pack.528OmT/_old 2015-01-20 19:02:45.000000000 +0100
+++ /var/tmp/diff_new_pack.528OmT/_new 2015-01-20 19:02:45.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package php5-pear-Horde_Oauth
#
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,7 +24,7 @@
Group: Development/Libraries/PHP
Name: php5-pear-Horde_Oauth
-Version: 2.0.0
+Version: 2.0.2
Release: 0
Source0: http://pear.horde.org/get/Horde_Oauth-%{version}.tgz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ Horde_Oauth-2.0.0.tgz -> Horde_Oauth-2.0.2.tgz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Horde_Oauth-2.0.2/doc/Horde/Oauth/COPYING
new/Horde_Oauth-2.0.2/doc/Horde/Oauth/COPYING
--- old/Horde_Oauth-2.0.2/doc/Horde/Oauth/COPYING 1970-01-01
01:00:00.000000000 +0100
+++ new/Horde_Oauth-2.0.2/doc/Horde/Oauth/COPYING 2015-01-09
10:25:19.000000000 +0100
@@ -0,0 +1,24 @@
+ Copyright 1999-2015 Horde LLC. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE HORDE PROJECT
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Horde_Oauth-2.0.2/doc/Horde/Oauth/TODO.txt
new/Horde_Oauth-2.0.2/doc/Horde/Oauth/TODO.txt
--- old/Horde_Oauth-2.0.2/doc/Horde/Oauth/TODO.txt 1970-01-01
01:00:00.000000000 +0100
+++ new/Horde_Oauth-2.0.2/doc/Horde/Oauth/TODO.txt 2015-01-09
10:25:19.000000000 +0100
@@ -0,0 +1,3 @@
+http://www.hueniverse.com/hueniverse/2009/03/sunday-morning-homework.html
+http://www.hueniverse.com/hueniverse/2009/04/explaining-the-oauth-session-fixation-attack.html
+http://hasin.wordpress.com/2009/05/02/using-oauth-pecl-extension-to-talk-to-twitter/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Horde_Oauth-2.0.2/lib/Horde/Oauth/Consumer.php
new/Horde_Oauth-2.0.2/lib/Horde/Oauth/Consumer.php
--- old/Horde_Oauth-2.0.2/lib/Horde/Oauth/Consumer.php 1970-01-01
01:00:00.000000000 +0100
+++ new/Horde_Oauth-2.0.2/lib/Horde/Oauth/Consumer.php 2015-01-09
10:25:19.000000000 +0100
@@ -0,0 +1,127 @@
+<?php
+/**
+ * Copyright 2008-2015 Horde LLC (http://www.horde.org/)
+ *
+ * @author Chuck Hagenbuch <[email protected]>
+ * @license http://www.horde.org/licenses/bsd BSD
+ * @category Horde
+ * @package Oauth
+ */
+
+/**
+ * OAuth consumer class
+ *
+ * @author Chuck Hagenbuch <[email protected]>
+ * @license http://www.horde.org/licenses/bsd BSD
+ * @category Horde
+ * @package Oauth
+ */
+class Horde_Oauth_Consumer
+{
+ protected $_config;
+
+ /**
+ * Const'r for consumer.
+ *
+ * @param array $config Configuration values:
+ * <pre>
+ * 'key' - Consumer key
+ * 'secret' - Consumer secret
+ * 'requestTokenUrl' - The request token URL
+ * 'authorizeTokenUrl' - The authorize URL
+ * 'accessTokenUrl' = To obtain an access token
+ * 'signatureMethod - Horde_Oauth_SignatureMethod object
+ * </pre>
+ *
+ * @return Horde_Oauth_Consumer
+ */
+ public function __construct($config)
+ {
+ // Check for required config
+ if (!is_array($config) || empty($config['key']) ||
empty($config['secret']) ||
+ empty($config['requestTokenUrl']) ||
empty($config['authorizeTokenUrl']) ||
+ empty($config['signatureMethod'])) {
+
+ throw new InvalidArgumentException('Missing a required parameter
in Horde_Oauth_Consumer::__construct');
+ }
+ $this->_config = $config;
+ }
+
+ public function __get($name)
+ {
+ return isset($this->_config[$name]) ? $this->_config[$name] : null;
+ }
+
+ /**
+ * Obtain an unprivileged request token
+ *
+ * @param array $params Parameter array
+ *
+ * @return Horde_Oauth_Token The oauth request token
+ */
+ public function getRequestToken($params = array())
+ {
+ $params['oauth_consumer_key'] = $this->key;
+ $params['oauth_callback'] = $this->callbackUrl;
+
+ $request = new Horde_Oauth_Request($this->requestTokenUrl, $params);
+ $request->sign($this->signatureMethod, $this);
+
+ $client = new Horde_Http_Client;
+
+ try {
+ $response = $client->post(
+ $this->requestTokenUrl,
+ $request->buildHttpQuery()
+ );
+ } catch (Horde_Http_Exception $e) {
+ throw new Horde_Oauth_Exception($e->getMessage());
+ }
+
+ return Horde_Oauth_Token::fromString($response->getBody());
+ }
+
+ /**
+ * Get the user authorization url used to request user authorization
+ *
+ * @param Horde_Oauth_Token $token the oauth request token
+ *
+ * @return string The user authorization url string
+ */
+ public function getUserAuthorizationUrl($token)
+ {
+ return $this->authorizeTokenUrl . '?oauth_token=' .
urlencode($token->key) . '&oauth_callback=' . urlencode($this->callbackUrl);
+ }
+
+ /**
+ * Obtain an access token from a request token
+ *
+ * @param Horde_Oauth_Token $token Open auth token containing the
oauth_token
+ * returned from provider after
authorization
+ * and the token secret returned with the
+ * original request token.
+ * @param array $params Any additional parameters for this
request
+ *
+ * @return unknown_type
+ */
+ public function getAccessToken($token, $params = array())
+ {
+ $params['oauth_consumer_key'] = $this->key;
+ $params['oauth_token'] = $token->key;
+
+ $request = new Horde_Oauth_Request($this->accessTokenUrl, $params);
+ $request->sign($this->signatureMethod, $this, $token);
+
+ $client = new Horde_Http_Client;
+ try {
+ $response = $client->post(
+ $this->accessTokenUrl,
+ $request->buildHttpQuery()
+ );
+ } catch (Horde_Http_Exception $e) {
+ throw new Horde_Oauth_Exception($e->getMessage());
+ }
+
+ return Horde_Oauth_Token::fromString($response->getBody());
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Horde_Oauth-2.0.2/lib/Horde/Oauth/Exception.php
new/Horde_Oauth-2.0.2/lib/Horde/Oauth/Exception.php
--- old/Horde_Oauth-2.0.2/lib/Horde/Oauth/Exception.php 1970-01-01
01:00:00.000000000 +0100
+++ new/Horde_Oauth-2.0.2/lib/Horde/Oauth/Exception.php 2015-01-09
10:25:19.000000000 +0100
@@ -0,0 +1,21 @@
+<?php
+/**
+ * Copyright 2008-2015 Horde LLC (http://www.horde.org/)
+ *
+ * @author Chuck Hagenbuch <[email protected]>
+ * @license http://www.horde.org/licenses/bsd BSD
+ * @category Horde
+ * @package Oauth
+ */
+
+/**
+ * OAuth exception class
+ *
+ * @author Chuck Hagenbuch <[email protected]>
+ * @license http://www.horde.org/licenses/bsd BSD
+ * @category Horde
+ * @package Oauth
+ */
+class Horde_Oauth_Exception extends Horde_Exception_Wrapped
+{
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Horde_Oauth-2.0.2/lib/Horde/Oauth/Request.php
new/Horde_Oauth-2.0.2/lib/Horde/Oauth/Request.php
--- old/Horde_Oauth-2.0.2/lib/Horde/Oauth/Request.php 1970-01-01
01:00:00.000000000 +0100
+++ new/Horde_Oauth-2.0.2/lib/Horde/Oauth/Request.php 2015-01-09
10:25:19.000000000 +0100
@@ -0,0 +1,201 @@
+<?php
+/**
+ * Copyright 2008-2015 Horde LLC (http://www.horde.org/)
+ *
+ * @author Chuck Hagenbuch <[email protected]>
+ * @license http://www.horde.org/licenses/bsd BSD
+ * @category Horde
+ * @package Oauth
+ */
+
+/**
+ * OAuth request class
+ *
+ * @author Chuck Hagenbuch <[email protected]>
+ * @license http://www.horde.org/licenses/bsd BSD
+ * @category Horde
+ * @package Oauth
+ */
+class Horde_Oauth_Request
+{
+ const VERSION = '1.0';
+
+ protected $_params = array();
+ protected $_url;
+ protected $_method;
+
+ function __construct($url, $params = array(), $method = 'POST')
+ {
+ if (!isset($params['oauth_version'])) {
+ $params['oauth_version'] = self::VERSION;
+ }
+ if (!isset($params['oauth_nonce'])) {
+ $params['oauth_nonce'] = self::_generateNonce();
+ }
+ if (!isset($params['oauth_timestamp'])) {
+ $params['oauth_timestamp'] = time();
+ }
+
+ $this->_params = $params;
+ $this->_url = $url;
+ $this->_method = $method;
+ }
+
+ /**
+ * Sign this request in accordance with OAuth
+ *
+ * @param $signatureMethod
+ * @param $consumer
+ * @param $token
+ * @return unknown_type
+ */
+ public function sign($signatureMethod, $consumer, $token = null)
+ {
+ if (empty($this->_params['oauth_consumer_key'])) {
+ $this->_params['oauth_consumer_key'] = $consumer->key;
+ }
+
+ if (empty($this->_params['oauth_token']) && !empty($token)) {
+ $this->_params['oauth_token'] = $token->key;
+ }
+
+ $this->_params['oauth_signature_method'] = $signatureMethod->getName();
+ $this->_params['oauth_signature'] = $signatureMethod->sign($this,
$consumer, $token);
+
+ return $this->_getNormalizedUrl() . '?' . $this->buildHttpQuery();
+ }
+
+ /**
+ * Returns the signable string of this request
+ *
+ * The base string is defined as the method, the url and the parameters
+ * (normalized), each urlencoded and concatenated with &.
+ */
+ public function getSignatureBaseString()
+ {
+ $parts = array(
+ $this->_getNormalizedHttpMethod(),
+ $this->_getNormalizedUrl(),
+ $this->_getSignableParameters()
+ );
+
+ return implode('&', array_map(array('Horde_Oauth_Utils',
'urlencodeRfc3986'), $parts));
+ }
+
+ /**
+ * Get a query string suitable for use in a URL or as POST data.
+ */
+ public function buildHttpQuery()
+ {
+ $parts = array();
+ foreach ($this->_params as $k => $v) {
+ $parts[] = Horde_Oauth_Utils::urlencodeRfc3986($k) . '=' .
Horde_Oauth_Utils::urlencodeRfc3986($v);
+ }
+ return implode('&', $parts);
+ }
+
+ /**
+ */
+ public function buildAuthorizationHeader($realm = '')
+ {
+ $header = '';
+ foreach ($this->_params as $k => $v) {
+ if (strpos($k, 'oauth_') !== false) {
+ $header .= Horde_Oauth_Utils::urlencodeRfc3986($k) . '="' .
Horde_Oauth_Utils::urlencodeRfc3986($v) . '",';
+ }
+ }
+ $header = substr($header, 0, -1);
+ if (!empty($realm)) {
+ $header .= ',realm="' .
Horde_Oauth_Utils::urlencodeRfc3986($realm) . '"';
+ }
+ return 'OAuth ' . $header;
+ }
+
+ /**
+ * Generate a nonce.
+ */
+ protected static function _generateNonce()
+ {
+ $mt = microtime();
+ $rand = mt_rand();
+
+ return hash('md5', microtime() . mt_rand());
+ }
+
+ /**
+ * Returns the normalized parameters of the request
+ *
+ * This will be all parameters except oauth_signature, sorted first by key,
+ * and if there are duplicate keys, then by value.
+ *
+ * The returned string will be all the key=value pairs concatenated by &.
+ *
+ * @return string
+ */
+ protected function _getSignableParameters()
+ {
+ // Grab all parameters
+ $params = $this->_params;
+
+ // Remove oauth_signature if present
+ if (isset($params['oauth_signature'])) {
+ unset($params['oauth_signature']);
+ }
+
+ // Urlencode both keys and values
+ $keys = array_map(array('Horde_Oauth_Utils', 'urlencodeRfc3986'),
array_keys($params));
+ $values = array_map(array('Horde_Oauth_Utils', 'urlencodeRfc3986'),
array_values($params));
+ $params = array_combine($keys, $values);
+
+ // Sort by keys (natsort)
+ uksort($params, 'strnatcmp');
+
+ // Generate key=value pairs
+ $pairs = array();
+ foreach ($params as $key => $value) {
+ if (is_array($value)) {
+ // If the value is an array, it's because there are multiple
values
+ // with the same key. Sort them, then add all the pairs.
+ natsort($value);
+ foreach ($value as $v2) {
+ $pairs[] = $key . '=' . $v2;
+ }
+ } else {
+ $pairs[] = $key . '=' . $value;
+ }
+ }
+
+ // Return the pairs, concatenated with &
+ return implode('&', $pairs);
+ }
+
+ /**
+ * Uppercases the HTTP method
+ */
+ protected function _getNormalizedHttpMethod()
+ {
+ return strtoupper($this->_method);
+ }
+
+ /**
+ * Parse the url and rebuilds it to be scheme://host/path
+ */
+ protected function _getNormalizedUrl()
+ {
+ $parts = parse_url($this->_url);
+ $scheme = $parts['scheme'];
+ $port = !empty($parts['port'])
+ ? $parts['port']
+ : $scheme == 'https' ? '443' : '80';
+
+ $host = $parts['host'];
+ $path = !empty($parts['path']) ? $parts['path'] : '';
+
+ if (($scheme == 'https' && $port != '443') ||
+ ($scheme == 'http' && $port != '80')) {
+ $host = "$host:$port";
+ }
+
+ return "$scheme://$host$path";
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Horde_Oauth-2.0.2/lib/Horde/Oauth/SignatureMethod/HmacSha1.php
new/Horde_Oauth-2.0.2/lib/Horde/Oauth/SignatureMethod/HmacSha1.php
--- old/Horde_Oauth-2.0.2/lib/Horde/Oauth/SignatureMethod/HmacSha1.php
1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_Oauth-2.0.2/lib/Horde/Oauth/SignatureMethod/HmacSha1.php
2015-01-09 10:25:19.000000000 +0100
@@ -0,0 +1,40 @@
+<?php
+/**
+ * Copyright 2008-2015 Horde LLC (http://www.horde.org/)
+ *
+ * @author Chuck Hagenbuch <[email protected]>
+ * @license http://www.horde.org/licenses/bsd BSD
+ * @category Horde
+ * @package Oauth
+ */
+
+/**
+ * OAuth HMAC-SHA1 signature method
+ *
+ * @author Chuck Hagenbuch <[email protected]>
+ * @license http://www.horde.org/licenses/bsd BSD
+ * @category Horde
+ * @package Oauth
+ */
+class Horde_Oauth_SignatureMethod_HmacSha1 extends Horde_Oauth_SignatureMethod
+{
+ public function getName()
+ {
+ return 'HMAC-SHA1';
+ }
+
+ public function sign($request, $consumer, $token)
+ {
+ $baseString = $request->getSignatureBaseString();
+
+ $key_parts = array(
+ $consumer->secret,
+ ($token) ? $token->secret : ''
+ );
+
+ $key_parts = array_map(array('Horde_Oauth_Utils','urlencodeRfc3986'),
$key_parts);
+ $key = implode('&', $key_parts);
+
+ return base64_encode(hash_hmac('sha1', $baseString, $key, true));
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Horde_Oauth-2.0.2/lib/Horde/Oauth/SignatureMethod/Plaintext.php
new/Horde_Oauth-2.0.2/lib/Horde/Oauth/SignatureMethod/Plaintext.php
--- old/Horde_Oauth-2.0.2/lib/Horde/Oauth/SignatureMethod/Plaintext.php
1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_Oauth-2.0.2/lib/Horde/Oauth/SignatureMethod/Plaintext.php
2015-01-09 10:25:19.000000000 +0100
@@ -0,0 +1,40 @@
+<?php
+/**
+ * Copyright 2008-2015 Horde LLC (http://www.horde.org/)
+ *
+ * @author Chuck Hagenbuch <[email protected]>
+ * @license http://www.horde.org/licenses/bsd BSD
+ * @category Horde
+ * @package Oauth
+ */
+
+/**
+ * OAuth plaintext signature method
+ *
+ * @author Chuck Hagenbuch <[email protected]>
+ * @license http://www.horde.org/licenses/bsd BSD
+ * @category Horde
+ * @package Oauth
+ */
+class Horde_Oauth_SignatureMethod_Plaintext extends Horde_Oauth_SignatureMethod
+{
+ public function getName()
+ {
+ return 'PLAINTEXT';
+ }
+
+ public function sign($request, $consumer, $token)
+ {
+ $signature = array(
+ Horde_Oauth_Utils::urlencodeRfc3986($consumer->secret),
+ );
+
+ if ($token) {
+ $signature[] = Horde_Oauth_Utils::urlencodeRfc3986($token->secret);
+ } else {
+ $signature[] = '';
+ }
+
+ return Horde_Oauth_Utils::urlencodeRfc3986(implode('&', $signature));
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Horde_Oauth-2.0.2/lib/Horde/Oauth/SignatureMethod/RsaSha1.php
new/Horde_Oauth-2.0.2/lib/Horde/Oauth/SignatureMethod/RsaSha1.php
--- old/Horde_Oauth-2.0.2/lib/Horde/Oauth/SignatureMethod/RsaSha1.php
1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_Oauth-2.0.2/lib/Horde/Oauth/SignatureMethod/RsaSha1.php
2015-01-09 10:25:19.000000000 +0100
@@ -0,0 +1,54 @@
+<?php
+/**
+ * Copyright 2008-2015 Horde LLC (http://www.horde.org/)
+ *
+ * @author Chuck Hagenbuch <[email protected]>
+ * @license http://www.horde.org/licenses/bsd BSD
+ * @category Horde
+ * @package Oauth
+ */
+
+/**
+ * OAuth RSA-SHA1 signature method
+ *
+ * @author Chuck Hagenbuch <[email protected]>
+ * @license http://www.horde.org/licenses/bsd BSD
+ * @category Horde
+ * @package Oauth
+ */
+class Horde_Oauth_SignatureMethod_RsaSha1 extends Horde_Oauth_SignatureMethod
+{
+ public function __construct($publicKey = null, $privateKey = null)
+ {
+ $this->_publicKey = $publicKey;
+ $this->_privateKey = $privateKey;
+ }
+
+ public function getName()
+ {
+ return 'RSA-SHA1';
+ }
+
+ public function sign($request, $consumer, $token)
+ {
+ $baseString = $request->getSignatureBaseString();
+
+ $pkeyid = openssl_pkey_get_private($this->_privateKey);
+ $ok = openssl_sign($baseString, $signature, $pkeyid);
+ openssl_free_key($pkeyid);
+
+ return base64_encode($signature);
+ }
+
+ public function verify($signature, $request, $consumer, $token)
+ {
+ $decodedSignature = base64_decode($signature);
+ $baseString = $request->getSignatureBaseString();
+
+ $pubkeyid = openssl_pkey_get_public($this->_publicKey);
+ $result = openssl_verify($baseString, $decodedSignature, $pubkeyid);
+ openssl_free_key($pubkeyid);
+
+ return $result == 1;
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Horde_Oauth-2.0.2/lib/Horde/Oauth/SignatureMethod.php
new/Horde_Oauth-2.0.2/lib/Horde/Oauth/SignatureMethod.php
--- old/Horde_Oauth-2.0.2/lib/Horde/Oauth/SignatureMethod.php 1970-01-01
01:00:00.000000000 +0100
+++ new/Horde_Oauth-2.0.2/lib/Horde/Oauth/SignatureMethod.php 2015-01-09
10:25:19.000000000 +0100
@@ -0,0 +1,29 @@
+<?php
+/**
+ * Copyright 2008-2015 Horde LLC (http://www.horde.org/)
+ *
+ * @author Chuck Hagenbuch <[email protected]>
+ * @license http://www.horde.org/licenses/bsd BSD
+ * @category Horde
+ * @package Oauth
+ */
+
+/**
+ * OAuth abstract signature method base class
+ *
+ * @author Chuck Hagenbuch <[email protected]>
+ * @license http://www.horde.org/licenses/bsd BSD
+ * @category Horde
+ * @package Oauth
+ */
+abstract class Horde_Oauth_SignatureMethod
+{
+ abstract public function getName();
+
+ abstract public function sign($request, $consumer, $token);
+
+ public function verify($signature, $request, $consumer, $token)
+ {
+ return $signature == $this->sign($request, $consumer, $token);
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Horde_Oauth-2.0.2/lib/Horde/Oauth/Token.php
new/Horde_Oauth-2.0.2/lib/Horde/Oauth/Token.php
--- old/Horde_Oauth-2.0.2/lib/Horde/Oauth/Token.php 1970-01-01
01:00:00.000000000 +0100
+++ new/Horde_Oauth-2.0.2/lib/Horde/Oauth/Token.php 2015-01-09
10:25:19.000000000 +0100
@@ -0,0 +1,50 @@
+<?php
+/**
+ * Copyright 2008-2015 Horde LLC (http://www.horde.org/)
+ *
+ * @author Chuck Hagenbuch <[email protected]>
+ * @license http://www.horde.org/licenses/bsd BSD
+ * @category Horde
+ * @package Oauth
+ */
+
+/**
+ * OAuth access tokens and request tokens
+ *
+ * @author Chuck Hagenbuch <[email protected]>
+ * @license http://www.horde.org/licenses/bsd BSD
+ * @category Horde
+ * @package Oauth
+ */
+class Horde_Oauth_Token
+{
+ public $key;
+ public $secret;
+
+ /**
+ * key = the token
+ * secret = the token secret
+ */
+ function __construct($key, $secret)
+ {
+ $this->key = $key;
+ $this->secret = $secret;
+ }
+
+ /**
+ * Generate the basic string serialization of a token that a server would
+ * respond to request_token and access_token calls with.
+ */
+ public function __toString()
+ {
+ return
+ 'oauth_token='.Horde_Oauth_Utils::urlencodeRfc3986($this->key).
+
'&oauth_token_secret='.Horde_Oauth_Utils::urlencodeRfc3986($this->secret);
+ }
+
+ public static function fromString($string)
+ {
+ parse_str($string, $parts);
+ return new self($parts['oauth_token'], $parts['oauth_token_secret']);
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Horde_Oauth-2.0.2/lib/Horde/Oauth/Utils.php
new/Horde_Oauth-2.0.2/lib/Horde/Oauth/Utils.php
--- old/Horde_Oauth-2.0.2/lib/Horde/Oauth/Utils.php 1970-01-01
01:00:00.000000000 +0100
+++ new/Horde_Oauth-2.0.2/lib/Horde/Oauth/Utils.php 2015-01-09
10:25:19.000000000 +0100
@@ -0,0 +1,28 @@
+<?php
+/**
+ * Copyright 2008-2015 Horde LLC (http://www.horde.org/)
+ *
+ * @author Chuck Hagenbuch <[email protected]>
+ * @license http://www.horde.org/licenses/bsd BSD
+ * @category Horde
+ * @package Oauth
+ */
+
+/**
+ * OAuth utilities
+ *
+ * @author Chuck Hagenbuch <[email protected]>
+ * @license http://www.horde.org/licenses/bsd BSD
+ * @category Horde
+ * @package Oauth
+ */
+class Horde_Oauth_Utils
+{
+ public static function urlencodeRfc3986($string)
+ {
+ return str_replace(array('%7E', '+'),
+ array('~', '%2B'),
+ rawurlencode($string));
+ }
+
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/package.xml new/package.xml
--- old/package.xml 2012-10-30 19:41:21.000000000 +0100
+++ new/package.xml 2015-01-09 10:25:19.000000000 +0100
@@ -11,10 +11,10 @@
<email>[email protected]</email>
<active>yes</active>
</lead>
- <date>2012-10-30</date>
- <time>19:41:21</time>
+ <date>2015-01-09</date>
+ <time>10:25:19</time>
<version>
- <release>2.0.0</release>
+ <release>2.0.2</release>
<api>1.0.0</api>
</version>
<stability>
@@ -23,27 +23,29 @@
</stability>
<license uri="http://www.horde.org/licenses/bsd">BSD-2-Clause</license>
<notes>
-* First stable release for Horde 5.
+* [jan] Add Composer definition.
</notes>
<contents>
<dir baseinstalldir="/" name="/">
- <file baseinstalldir="/" md5sum="03dc05714e363d71bd24f3fae5ed5903"
name="doc/Horde/Oauth/COPYING" role="doc" />
+ <file baseinstalldir="/" md5sum="5dee577470a920508ad14b3458db79a5"
name="doc/Horde/Oauth/COPYING" role="doc" />
<file baseinstalldir="/" md5sum="d0be0449a4c5d44a58edbed8e40e0dc8"
name="doc/Horde/Oauth/TODO.txt" role="doc" />
- <file baseinstalldir="/" md5sum="5c18d001c0c79cedeaf44be6136a5817"
name="lib/Horde/Oauth/SignatureMethod/HmacSha1.php" role="php" />
- <file baseinstalldir="/" md5sum="261058aa70ef7423bc156c1a9e299476"
name="lib/Horde/Oauth/SignatureMethod/Plaintext.php" role="php" />
- <file baseinstalldir="/" md5sum="0645f8f4907ec17d0e752dafd40735b2"
name="lib/Horde/Oauth/SignatureMethod/RsaSha1.php" role="php" />
- <file baseinstalldir="/" md5sum="78ebbb1bcf19a9baa1fc1443f5c52a1c"
name="lib/Horde/Oauth/Consumer.php" role="php" />
- <file baseinstalldir="/" md5sum="3ce893dc94363da25cab44c2431bf280"
name="lib/Horde/Oauth/Exception.php" role="php" />
- <file baseinstalldir="/" md5sum="9884b56a73f66737a9624bd0d77845a9"
name="lib/Horde/Oauth/Request.php" role="php" />
- <file baseinstalldir="/" md5sum="c4a62093e3be179419bf1f9c69666d14"
name="lib/Horde/Oauth/SignatureMethod.php" role="php" />
- <file baseinstalldir="/" md5sum="b22de14ca699e841911481d970303612"
name="lib/Horde/Oauth/Token.php" role="php" />
- <file baseinstalldir="/" md5sum="8bca04f98639cf67d0e9f66415109851"
name="lib/Horde/Oauth/Utils.php" role="php" />
+ <file baseinstalldir="/" md5sum="4ee76e36fc44baad9982df21ea45969f"
name="lib/Horde/Oauth/SignatureMethod/HmacSha1.php" role="php" />
+ <file baseinstalldir="/" md5sum="5f349a0b68192b8c5e569be4fbda64cb"
name="lib/Horde/Oauth/SignatureMethod/Plaintext.php" role="php" />
+ <file baseinstalldir="/" md5sum="8f4f80f1fc34ec6c1b97821ae9878681"
name="lib/Horde/Oauth/SignatureMethod/RsaSha1.php" role="php" />
+ <file baseinstalldir="/" md5sum="38762a0cb33990c50230005a2769ca93"
name="lib/Horde/Oauth/Consumer.php" role="php" />
+ <file baseinstalldir="/" md5sum="27dfd9c7ef5eefd83f852ce56b6d4b23"
name="lib/Horde/Oauth/Exception.php" role="php" />
+ <file baseinstalldir="/" md5sum="0e54a0402c09b543c9857a76d7e91f83"
name="lib/Horde/Oauth/Request.php" role="php" />
+ <file baseinstalldir="/" md5sum="ea68446167cf2533c2ed38243fda6d0c"
name="lib/Horde/Oauth/SignatureMethod.php" role="php" />
+ <file baseinstalldir="/" md5sum="a39f8f92e024de4e67982ccd0b5cf2b9"
name="lib/Horde/Oauth/Token.php" role="php" />
+ <file baseinstalldir="/" md5sum="b7064bb86b54aec6d4fcc3b8f694a33a"
name="lib/Horde/Oauth/Utils.php" role="php" />
</dir>
</contents>
<dependencies>
<required>
<php>
<min>5.3.0</min>
+ <max>6.0.0alpha1</max>
+ <exclude>6.0.0alpha1</exclude>
</php>
<pearinstaller>
<min>1.7.0</min>
@@ -252,5 +254,35 @@
* First stable release for Horde 5.
</notes>
</release>
+ <release>
+ <version>
+ <release>2.0.1</release>
+ <api>1.0.0</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <date>2012-11-22</date>
+ <license uri="http://www.horde.org/licenses/bsd">BSD-2-Clause</license>
+ <notes>
+* [jan] Re-packaged 2.0.0 release.
+ </notes>
+ </release>
+ <release>
+ <version>
+ <release>2.0.2</release>
+ <api>1.0.0</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <date>2015-01-09</date>
+ <license uri="http://www.horde.org/licenses/bsd">BSD-2-Clause</license>
+ <notes>
+* [jan] Add Composer definition.
+ </notes>
+ </release>
</changelog>
</package>
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]