authserver/testCAS/app/Http/Middleware/CasAuthenticate.php
author durandn
Wed, 09 Sep 2015 17:48:05 +0200
changeset 115 5b3afe8c5592
parent 0 1afc9d2ab94d
permissions -rw-r--r--
Adjustments on Markers: user can't post new marker if too close to another one + clicking the create button will create a "placeholder" marker to show where the marker will be posted
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
1afc9d2ab94d first commit of cas auth env
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
<?php namespace TestCAS\Http\Middleware;
1afc9d2ab94d first commit of cas auth env
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
1afc9d2ab94d first commit of cas auth env
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
use Cas;
1afc9d2ab94d first commit of cas auth env
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
use Closure;
1afc9d2ab94d first commit of cas auth env
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
1afc9d2ab94d first commit of cas auth env
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
class CasAuthenticate
1afc9d2ab94d first commit of cas auth env
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
{
1afc9d2ab94d first commit of cas auth env
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
    /**
1afc9d2ab94d first commit of cas auth env
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
     * Handle an incoming request.
1afc9d2ab94d first commit of cas auth env
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
     *
1afc9d2ab94d first commit of cas auth env
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
     * @param  \Illuminate\Http\Request  $request
1afc9d2ab94d first commit of cas auth env
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
     * @param  \Closure  $next
1afc9d2ab94d first commit of cas auth env
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
     * @return mixed
1afc9d2ab94d first commit of cas auth env
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
     */
1afc9d2ab94d first commit of cas auth env
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
    public function handle($request, Closure $next)
1afc9d2ab94d first commit of cas auth env
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
    {
1afc9d2ab94d first commit of cas auth env
ymh <ymh.work@gmail.com>
parents:
diff changeset
    17
        Cas::authenticate();
1afc9d2ab94d first commit of cas auth env
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
        return $next($request);
1afc9d2ab94d first commit of cas auth env
ymh <ymh.work@gmail.com>
parents:
diff changeset
    19
    }
1afc9d2ab94d first commit of cas auth env
ymh <ymh.work@gmail.com>
parents:
diff changeset
    20
}