Skip to content

Commit

Permalink
Fixed typo in Cas Facade
Browse files Browse the repository at this point in the history
  • Loading branch information
Zach Jetson committed May 20, 2015
1 parent a5829dd commit 48f3982
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 48f3982

Please sign in to comment.