Skip to content

Commit

Permalink
Merge pull request #8 from subfission/develop
Browse files Browse the repository at this point in the history
Fixed typo in Middleware
  • Loading branch information
subfission committed May 20, 2015
2 parents 7e49b81 + 48f3982 commit 271c5d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/Subfission/Cas/Middleware/CASAuth.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?php namespace Subfission\Cas\Middleware;

use Closure;
use Illuminate\Auth\AuthManager;
use Illuminate\Contracts\Auth\Guard;

class CASAuth {

protected $config;
protected $auth;
protected $session;

public function __construct(Auth $auth)
public function __construct(Guard $auth)
{
$this->auth = $auth;
$this->config = config('cas');
Expand Down
9 changes: 3 additions & 6 deletions src/Subfission/Cas/Middleware/RedirectCASAuthenticated.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

use Closure;
use Illuminate\Contracts\Auth\Guard;
use App;
use Config;

class RedirectCASAuthenticated {

Expand All @@ -13,7 +11,7 @@ class RedirectCASAuthenticated {
public function __construct(Guard $auth)
{
$this->auth = $auth;
$this->cas = (App::make('cas'));
$this->cas = app('cas');
}

/**
Expand All @@ -27,11 +25,10 @@ public function handle($request, Closure $next)
{
if($this->cas->isAuthenticated())
{
$redirect_path = Config::get('redirect_path');
$redirect_path = config('redirect_path');
return redirect( $redirect_path ? $redirect_path : 'home');
}

return $next($request);
}

}
}

0 comments on commit 271c5d3

Please sign in to comment.