Compare commits

...

16 Commits
0.4 ... 0.4.2

Author SHA1 Message Date
Alex Bilbie
e415e0051a Version bump 2013-01-24 15:44:07 +00:00
Nick Jackson
608bcb767b Bearer token now correctly base64 decoding 2013-01-08 15:52:17 +00:00
Alex Bilbie
b4e8c27618 Merge branch 'release/0.4.1' 2013-01-02 22:36:48 +00:00
Alex Bilbie
d65cdaf028 Version bump 2013-01-02 22:36:41 +00:00
Alex Bilbie
5f1779c4e7 Autoload dependencies with autoloader in bootstrap.php 2013-01-02 22:32:49 +00:00
Alex Bilbie
b10613c5e3 Composer install 2013-01-02 21:31:33 +00:00
Alex Bilbie
1c3b319aa6 Altered the script parameter of .travis.yml 2013-01-02 21:22:09 +00:00
Alex Bilbie
1069507ab4 Revert require_once statements 2013-01-02 21:13:32 +00:00
Alex Bilbie
5ca63c921a Updated PHPUnit.xml 2013-01-02 21:13:12 +00:00
Alex Bilbie
943fc1cc82 Possible fix for Travis? 2013-01-02 20:34:09 +00:00
Alex Bilbie
a158883aed Another attempt to fix paths for travis 2013-01-02 20:32:38 +00:00
Alex Bilbie
8aba2b29b8 Better travis debugging 2013-01-02 20:24:45 +00:00
Alex Bilbie
b5e8f9206b Fool. 2013-01-02 20:21:25 +00:00
Alex Bilbie
755a753cb5 Test include path on travis 2013-01-02 20:19:26 +00:00
Alex Bilbie
e99211db31 Moved require_once statement outside of setUp tests method 2013-01-02 20:13:02 +00:00
Alex Bilbie
1142f8d86b Merge branch 'release/0.4' into develop 2013-01-02 19:17:12 +00:00
7 changed files with 14 additions and 12 deletions

View File

@@ -4,4 +4,5 @@ php:
- 5.3
- 5.4
script: phpunit --coverage-text --configuration build/phpunit.xml
before_script: composer install
script: phpunit -c build/phpunit.xml

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit colors="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" stopOnError="false" stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false">
<phpunit colors="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" stopOnError="false" stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false" bootstrap="../tests/Bootstrap.php">
<testsuites>
<testsuite name="Authentication Server">
<directory suffix="test.php">../tests/authentication</directory>
@@ -17,7 +17,8 @@
</blacklist>
</filter>
<logging>
<log type="coverage-html" target="coverage" title="lncd/OAuth" charset="UTF-8" yui="true" highlight="true" lowUpperBound="35" highLowerBound="70"/>
<log type="coverage-html" target="coverage" title="lncd/OAuth" charset="UTF-8" yui="true" highlight="true" lowUpperBound="50" highLowerBound="90"/>
<log type="coverage-text" target="php://stdout" title="lncd/OAuth" charset="UTF-8" yui="true" highlight="true" lowUpperBound="50" highLowerBound="90"/>
<log type="coverage-clover" target="logs/clover.xml"/>
<log type="junit" target="logs/junit.xml" logIncompleteSkipped="false"/>
</logging>

View File

@@ -1,7 +1,7 @@
{
"name": "lncd/oauth2",
"description": "OAuth 2.0 Framework",
"version": "0.4",
"version": "0.4.2",
"homepage": "https://github.com/lncd/OAuth2",
"license": "MIT",
"require": {

View File

@@ -148,7 +148,7 @@ class Server
if (isset($headers['Authorization'])) {
$rawToken = trim(str_replace('Bearer', '', $headers['Authorization']));
$rawToken = base64_decode(str_replace('Bearer ', '', trim($headers['Authorization'])));
if ( ! empty($rawToken)) {
$accessToken = $rawToken;
@@ -250,4 +250,4 @@ class Server
return call_user_func_array(array($this->_db, $method), $params);
}
}
}

6
tests/Bootstrap.php Normal file
View File

@@ -0,0 +1,6 @@
<?php
if ( ! @include_once __DIR__ . '/../vendor/autoload.php')
{
exit("You must set up the project dependencies, run the following commands:\n> wget http://getcomposer.org/composer.phar\n> php composer.phar install\n");
}

View File

@@ -4,9 +4,6 @@ class Authentication_Server_test extends PHPUnit_Framework_TestCase
{
public function setUp()
{
require_once 'src/OAuth2/Authentication/Server.php';
require_once 'src/OAuth2/Authentication/Database.php';
$this->oauth = new Oauth2\Authentication\Server();
require_once 'database_mock.php';

View File

@@ -4,9 +4,6 @@ class Resource_Server_test extends PHPUnit_Framework_TestCase {
function setUp()
{
require_once 'src/OAuth2/Resource/Server.php';
require_once 'src/OAuth2/Resource/Database.php';
require_once('database_mock.php');
$this->server = new Oauth2\Resource\Server();
$this->db = new ResourceDB();