Skip to content

Commit

Permalink
Revert to 47d9a8e
Browse files Browse the repository at this point in the history
  • Loading branch information
CupOfTea696 committed Apr 3, 2015
1 parent ccce21a commit 6629afe
Showing 1 changed file with 4 additions and 58 deletions.
62 changes: 4 additions & 58 deletions src/CupOfTea/YouTube/API/Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

use Auth;
use Illuminate\Http\Request;
use Illuminate\Session\Store as Session;
use CupOfTea\YouTube\Models\RefreshToken;
use Symfony\Component\HttpFoundation\RedirectResponse;
use CupOfTea\YouTube\Exceptions\InvalidStateException;
Expand All @@ -13,7 +12,7 @@
class Provider implements ProviderContract {

const PACKAGE = 'CupOfTea/YouTube';
const VERSION = '0.2.3-beta';
const VERSION = '0.2.2-beta';

/**
* Available Resources for this API.
Expand Down Expand Up @@ -50,20 +49,6 @@ class Provider implements ProviderContract {
*/
protected $session;

/**
* The input code.
*
* @var Request
*/
protected $code;

/**
* The state.
*
* @var Request
*/
protected $state;

/**
* This package's configuration
*
Expand Down Expand Up @@ -392,9 +377,9 @@ public function user()
*/
protected function hasInvalidState()
{
$this->state = $this->state ? $this->state : $this->request->input('state') ? $this->request->input('state') : $this->request->old('state');
$state = $this->request->input('state') ? $this->request->input('state') : $this->request->old('state');

return ! ($this->state === $this->session->get($this->package('dot') . '.state'));
return ! ($state === $this->session->get($this->package('dot') . '.state'));
}

/**
Expand Down Expand Up @@ -500,7 +485,7 @@ public function authenticatedMethodCalled(){
*/
protected function getCode()
{
return $this->code ? $this->code : $this->request->input('code') ? $this->request->input('code') : $this->request->old('code');
return $this->request->input('code') ? $this->request->input('code') : $this->request->old('code');
}

/**
Expand Down Expand Up @@ -540,46 +525,7 @@ public function setRequest(Request $request)
{
$this->request = $request;
$this->session = $request->getSession();

return $this;
}

/**
* Set the request instance.
*
* @param Session $session
* @return $this
*/
public function setSession(Session $session)
{
$this->session = $session;

return $this;
}

/**
* Set the input code.
*
* @param string $code
* @return $this
*/
public function setCode($code)
{
$this->code = $code;

return $this;
}

/**
* Set the state.
*
* @param string $state
* @return $this
*/
public function setState($state)
{
$this->state = $state;

return $this;
}

Expand Down

0 comments on commit 6629afe

Please sign in to comment.