diff --git a/src/Lunr/Spark/Twitter/Api.php b/src/Lunr/Spark/Twitter/Api.php
index f8a79b481b1922b2089a0536ea6b86c60cb451fe..57e19779167eeb2c3cebfd39fc210486275b18cb 100644
--- a/src/Lunr/Spark/Twitter/Api.php
+++ b/src/Lunr/Spark/Twitter/Api.php
@@ -189,6 +189,8 @@ abstract class Api
             $error   = $result['errors'][0];
             $context = [ 'message' => $error['message'], 'code' => $error['code'], 'request' => $url ];
             $this->logger->error('Twitter API Request ({request}) failed, ({code}): {message}', $context);
+
+            $result = '';
         }
 
         unset($response);
diff --git a/src/Lunr/Spark/Twitter/Authentication.php b/src/Lunr/Spark/Twitter/Authentication.php
new file mode 100644
index 0000000000000000000000000000000000000000..165074ee153638db796de9e489c50f12d526c3d1
--- /dev/null
+++ b/src/Lunr/Spark/Twitter/Authentication.php
@@ -0,0 +1,91 @@
+<?php
+
+/**
+ * This file contains Authentication support for Twitter.
+ *
+ * PHP Version 5.4
+ *
+ * @category   Libraries
+ * @package    Spark
+ * @subpackage Twitter
+ * @author     Dinos Theodorou <dinos@m2mobi.com>
+ * @copyright  2013, M2Mobi BV, Amsterdam, The Netherlands
+ * @license    http://lunr.nl/LICENSE MIT License
+ */
+
+namespace Lunr\Spark\Twitter;
+
+/**
+ * Twitter Authentication Support for Spark
+ *
+ * @category   Libraries
+ * @package    Spark
+ * @subpackage Twitter
+ * @author     Dinos Theodorou <dinos@m2mobi.com>
+ */
+class Authentication extends Api
+{
+
+    /**
+     * Constructor.
+     *
+     * @param CentralAuthenticationStore $cas     Shared instance of the CentralAuthenticationStore class.
+     * @param LoggerInterface            $logger  Shared instance of a Logger class.
+     * @param Curl                       $curl    Shared instance of the Curl class.
+     */
+    public function __construct($cas, $logger, $curl)
+    {
+        parent::__construct($cas, $logger, $curl);
+    }
+
+    /**
+     * Destructor.
+     */
+    public function __destruct()
+    {
+        parent::__destruct();
+    }
+
+    /**
+     * Retrieves the bearer access token from the twitter api.
+     *
+     * Allows a registered application to obtain an OAuth 2 Bearer Token,
+     * which can be used to make API requests on an application's own behalf,
+     * without a user context. This is called Application-only authentication.
+     *
+     * @return array The response array with the bearer access token
+     */
+    public function get_bearer_token()
+    {
+        $header = [
+            'Content-Type' => 'application/x-www-form-urlencoded;charset=UTF-8',
+            'User-Agent' => $this->user_agent
+        ];
+
+        $options = [
+            'CURLOPT_USERPWD' => $this->consumer_key . ':' . $this->consumer_secret,
+            'CURLOPT_VERBOSE' => 1,
+            'CURLOPT_SSL_VERIFYPEER' => 1
+        ];
+
+        $params = [
+            'grant_type' => 'client_credentials'
+        ];
+
+        $url = Domain::API . 'oauth2/token';
+
+        $result = $this->get_json_results($url, $header, $options, $params, 'post');
+
+        if (empty($result) === TRUE)
+        {
+            return '';
+        }
+
+        $this->bearer_token = $result['access_token'];
+
+        return $result;
+    }
+
+}
+
+?>
diff --git a/src/Lunr/Spark/Twitter/Tests/AuthenticationApiTest.php b/src/Lunr/Spark/Twitter/Tests/AuthenticationApiTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..d1d18271cb99ec9fe37f57956542998ff46c62f7
--- /dev/null
+++ b/src/Lunr/Spark/Twitter/Tests/AuthenticationApiTest.php
@@ -0,0 +1,169 @@
+<?php
+
+/**
+ * This file contains the AuthenticationApiTest class.
+ *
+ * PHP Version 5.4
+ *
+ * @category   Libraries
+ * @package    Spark
+ * @subpackage Tests
+ * @author     Dinos Theodorou <dinos@m2mobi.com>
+ * @copyright  2013, M2Mobi BV, Amsterdam, The Netherlands
+ * @license    http://lunr.nl/LICENSE MIT License
+ */
+
+namespace Lunr\Spark\Twitter\Tests;
+
+use Aws\DynamoDb\Exception\ValidationException;
+
+use Lunr\Spark\Twitter\Authentication;
+use Lunr\Halo\LunrBaseTest;
+use ReflectionClass;
+
+/**
+ * This class contains the tests for the Authentication.
+ *
+ * @category   Libraries
+ * @package    Spark
+ * @subpackage Tests
+ * @author     Dinos Theodorou <dinos@m2mobi.com>
+ * @covers     Lunr\Spark\Twitter\Authentication
+ */
+class AuthenticationApiTest extends AuthenticationTest
+{
+
+    /**
+     * Test that get_bearer_token() returns an empty string on request error.
+     *
+     * @covers Lunr\Spark\Twitter\Authentication::get_bearer_token
+     */
+    public function testGetBearerTokenReturnsErrorStringOnError()
+    {
+        $url    = 'https://api.twitter.com/oauth2/token';
+        $params = 'grant_type=client_credentials';
+
+        $this->cas->expects($this->at(0))
+                  ->method('get')
+                  ->with($this->equalTo('twitter'), $this->equalTo('user_agent'))
+                  ->will($this->returnValue('lunr.nl'));
+
+        $this->cas->expects($this->at(1))
+                  ->method('get')
+                  ->with($this->equalTo('twitter'), $this->equalTo('consumer_key'))
+                  ->will($this->returnValue('Key'));
+
+        $this->cas->expects($this->at(2))
+                  ->method('get')
+                  ->with($this->equalTo('twitter'), $this->equalTo('consumer_secret'))
+                  ->will($this->returnValue('Secret'));
+
+        $this->curl->expects($this->once())
+                   ->method('post_request')
+                   ->will($this->returnValue($this->response));
+
+        $this->response->expects($this->once())
+                       ->method('get_result')
+                       ->will($this->returnValue('{"errors":[{"message":"Test twitter error","code":34}]}'));
+
+        $this->response->expects($this->once())
+                       ->method('__get')
+                       ->with($this->equalTo('http_code'))
+                       ->will($this->returnValue(400));
+
+        $this->assertSame('', $this->class->get_bearer_token());
+    }
+
+    /**
+     * Test that get_bearer_token() stores the bearer access token in the CAS.
+     *
+     * @covers Lunr\Spark\Twitter\Authentication::get_bearer_token
+     */
+    public function testGetBearerTokenStoresBearerTokenInCas()
+    {
+        $url    = 'https://api.twitter.com/oauth2/token';
+        $params = 'grant_type=client_credentials';
+
+        $this->cas->expects($this->at(0))
+                  ->method('get')
+                  ->with($this->equalTo('twitter'), $this->equalTo('user_agent'))
+                  ->will($this->returnValue('lunr.nl'));
+
+        $this->cas->expects($this->at(1))
+                  ->method('get')
+                  ->with($this->equalTo('twitter'), $this->equalTo('consumer_key'))
+                  ->will($this->returnValue('Key'));
+
+        $this->cas->expects($this->at(2))
+                  ->method('get')
+                  ->with($this->equalTo('twitter'), $this->equalTo('consumer_secret'))
+                  ->will($this->returnValue('Secret'));
+
+        $this->curl->expects($this->once())
+                   ->method('post_request')
+                   ->will($this->returnValue($this->response));
+
+        $this->response->expects($this->once())
+                       ->method('get_result')
+                       ->will($this->returnValue('{"token_type":"bearer","access_token":"TOKEN"}'));
+
+        $this->response->expects($this->once())
+                       ->method('__get')
+                       ->with($this->equalTo('http_code'))
+                       ->will($this->returnValue(200));
+
+        $this->cas->expects($this->once())
+                  ->method('add')
+                  ->with($this->equalTo('twitter'), $this->equalTo('bearer_token'), $this->equalTo('TOKEN'));
+
+        $this->assertArrayHasKey('access_token', $this->class->get_bearer_token());
+    }
+
+    /**
+     * Test that get_bearer_token() returns the bearer access token.
+     *
+     * @covers Lunr\Spark\Twitter\Authentication::get_bearer_token
+     */
+    public function testGetBearerTokenReturnsBearerToken()
+    {
+        $url    = 'https://api.twitter.com/oauth2/token';
+        $params = 'grant_type=client_credentials';
+
+        $this->cas->expects($this->at(0))
+                  ->method('get')
+                  ->with($this->equalTo('twitter'), $this->equalTo('user_agent'))
+                  ->will($this->returnValue('lunr.nl'));
+
+        $this->cas->expects($this->at(1))
+                  ->method('get')
+                  ->with($this->equalTo('twitter'), $this->equalTo('consumer_key'))
+                  ->will($this->returnValue('Key'));
+
+        $this->cas->expects($this->at(2))
+                  ->method('get')
+                  ->with($this->equalTo('twitter'), $this->equalTo('consumer_secret'))
+                  ->will($this->returnValue('Secret'));
+
+        $this->curl->expects($this->once())
+                   ->method('post_request')
+                   ->will($this->returnValue($this->response));
+
+        $this->response->expects($this->once())
+                       ->method('get_result')
+                       ->will($this->returnValue('{"token_type":"bearer","access_token":"TOKEN"}'));
+
+        $this->response->expects($this->once())
+                       ->method('__get')
+                       ->with($this->equalTo('http_code'))
+                       ->will($this->returnValue(200));
+
+        $this->cas->expects($this->once())
+                  ->method('add')
+                  ->with($this->equalTo('twitter'), $this->equalTo('bearer_token'), $this->equalTo('TOKEN'));
+
+        $this->assertContains('TOKEN', $this->class->get_bearer_token());
+    }
+
+}
+
+?>
diff --git a/src/Lunr/Spark/Twitter/Tests/AuthenticationBaseTest.php b/src/Lunr/Spark/Twitter/Tests/AuthenticationBaseTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..9c67fddede8737ada5b49aa1a85a2b6dc0bc8a60
--- /dev/null
+++ b/src/Lunr/Spark/Twitter/Tests/AuthenticationBaseTest.php
@@ -0,0 +1,60 @@
+<?php
+
+/**
+ * This file contains the AuthenticationBaseTest class.
+ *
+ * PHP Version 5.4
+ *
+ * @category   Libraries
+ * @package    Spark
+ * @subpackage Tests
+ * @author     Heinz Wiesinger <heinz@m2mobi.com>
+ * @copyright  2013, M2Mobi BV, Amsterdam, The Netherlands
+ * @license    http://lunr.nl/LICENSE MIT License
+ */
+
+namespace Lunr\Spark\Twitter\Tests;
+
+use Lunr\Spark\Twitter\Authentication;
+use Lunr\Halo\LunrBaseTest;
+use ReflectionClass;
+
+/**
+ * This class contains the tests for the Authentication.
+ *
+ * @category   Libraries
+ * @package    Spark
+ * @subpackage Tests
+ * @author     Heinz Wiesinger <heinz@m2mobi.com>
+ * @covers     Lunr\Spark\Twitter\Authentication
+ */
+class AuthenticationBaseTest extends AuthenticationTest
+{
+
+    /**
+     * Test that the CentralAuthenticationStore class is passed correctly.
+     */
+    public function testCasIsSetCorrectly()
+    {
+        $this->assertPropertySame('cas', $this->cas);
+    }
+
+    /**
+     * Test that the Curl class is passed correctly.
+     */
+    public function testCurlIsSetCorrectly()
+    {
+        $this->assertPropertySame('curl', $this->curl);
+    }
+
+    /**
+     * Test that the Logger class is passed correctly.
+     */
+    public function testLoggerIsSetCorrectly()
+    {
+        $this->assertPropertySame('logger', $this->logger);
+    }
+
+}
+
+?>
diff --git a/src/Lunr/Spark/Twitter/Tests/AuthenticationTest.php b/src/Lunr/Spark/Twitter/Tests/AuthenticationTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..7cd712394146364cf963c9f5540c24445f1ac913
--- /dev/null
+++ b/src/Lunr/Spark/Twitter/Tests/AuthenticationTest.php
@@ -0,0 +1,96 @@
+<?php
+
+/**
+ * This file contains the AuthenticationTest class.
+ *
+ * PHP Version 5.4
+ *
+ * @category   Libraries
+ * @package    Spark
+ * @subpackage Tests
+ * @author     Dinos Theodorou <dinos@m2mobi.com>
+ * @copyright  2013, M2Mobi BV, Amsterdam, The Netherlands
+ * @license    http://lunr.nl/LICENSE MIT License
+ */
+
+namespace Lunr\Spark\Twitter\Tests;
+
+use Lunr\Spark\Twitter\Authentication;
+use Lunr\Halo\LunrBaseTest;
+use ReflectionClass;
+
+/**
+ * This class contains the tests for the Api.
+ *
+ * @category   Libraries
+ * @package    Spark
+ * @subpackage Tests
+ * @author     Dinos Theodorou <dinos@m2mobi.com>
+ * @covers     Lunr\Spark\Twitter\Authentication
+ */
+abstract class AuthenticationTest extends LunrBaseTest
+{
+
+    /**
+     * Mock instance of the CentralAuthenticationStore class.
+     * @var CentralAuthenticationStore
+     */
+    protected $cas;
+
+    /**
+     * Mock instance of the Curl class.
+     * @var Curl
+     */
+    protected $curl;
+
+    /**
+     * Mock instance of the Logger class
+     * @var LoggerInterface
+     */
+    protected $logger;
+
+    /**
+     * Mock instance of the Request class.
+     * @var RequestInterface
+     */
+    protected $request;
+
+    /**
+     * Mock instance of the CurlResponse class.
+     * @var CurlResponse
+     */
+    protected $response;
+
+    /**
+     * Testcase Constructor.
+     */
+    public function setUp()
+    {
+        $this->cas      = $this->getMock('Lunr\Spark\CentralAuthenticationStore');
+        $this->curl     = $this->getMock('Lunr\Network\Curl');
+        $this->logger   = $this->getMock('Psr\Log\LoggerInterface');
+        $this->response = $this->getMockBuilder('Lunr\Network\CurlResponse')
+                               ->disableOriginalConstructor()
+                               ->getMock();
+
+        $this->class      = new Authentication($this->cas, $this->logger, $this->curl);
+        $this->reflection = new ReflectionClass('Lunr\Spark\Twitter\Authentication');
+    }
+
+    /**
+     * Testcase Destructor.
+     */
+    public function tearDown()
+    {
+        unset($this->class);
+        unset($this->reflection);
+        unset($this->cas);
+        unset($this->curl);
+        unset($this->logger);
+        unset($this->request);
+        unset($this->response);
+    }
+
+}
+
+?>
diff --git a/tests/phpunit.xml b/tests/phpunit.xml
index a6c510214084e86af7b360426421e4f252d3ee64..3d4af381f1784d0b2c07ba21c5b25e75d2e9acda 100644
--- a/tests/phpunit.xml
+++ b/tests/phpunit.xml
@@ -207,6 +207,8 @@
             <file>src/Lunr/Spark/Twitter/Tests/ApiBaseTest.php</file>
             <file>src/Lunr/Spark/Twitter/Tests/ApiGetJsonResultsTest.php</file>
             <file>src/Lunr/Spark/Twitter/Tests/ApiGetUrlResultsTest.php</file>
+            <file>src/Lunr/Spark/Twitter/Tests/AuthenticationApiTest.php</file>
+            <file>src/Lunr/Spark/Twitter/Tests/AuthenticationBaseTest.php</file>
         </testsuite>
         <testsuite name="Spawn">
             <file>src/Lunr/Spawn/Tests/ResqueJobDispatcherBaseTest.php</file>
