<?php

/*
|--------------------------------------------------------------------------
| Application & Route Filters
|--------------------------------------------------------------------------
|
| Below you will find the "before" and "after" events for the application
| which may be used to do any work before or after a request into your
| application. Here you may also register your custom route filters.
|
*/
App::before(function ($request) {
    $authzToken = new Airavata\Model\Security\AuthzToken();
    $authzToken->accessToken = "emptyToken";
    $apiVersion = Airavata::getAPIVersion($authzToken);
    if (empty($apiVersion)) {
        return View::make("server-down");
    } else {
        Session::put('authz-token', $authzToken);
    }
});
App::after(function ($request, $response) {
    //
    // Test commit.
});
/*
|--------------------------------------------------------------------------
| Authentication Filters
|--------------------------------------------------------------------------
|
<?php

/*
|--------------------------------------------------------------------------
| Application & Route Filters
|--------------------------------------------------------------------------
|
| Below you will find the "before" and "after" events for the application
| which may be used to do any work before or after a request into your
| application. Here you may also register your custom route filters.
|
*/
App::before(function ($request) {
    $apiVersion = Airavata::getAPIVersion();
    if (empty($apiVersion)) {
        return View::make("server-down");
    }
});
App::after(function ($request, $response) {
    //
    // Test commit.
});
/*
|--------------------------------------------------------------------------
| Authentication Filters
|--------------------------------------------------------------------------
|
| The following filters are used to verify that the user of the current
| session is logged into this application. The "basic" filter easily
| integrates HTTP Basic authentication for quick, simple checking.
|