mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-17 11:04:07 -08:00
934afa036f
Shift automatically applies the Laravel coding style - which uses the PSR-2 coding style as a base with some minor additions. You may customize the adopted coding style by adding your own [PHP CS Fixer][1] `.php_cs` config file to your project root. Feel free to use [Shift's Laravel ruleset][2] to help you get started. [1]: https://github.com/FriendsOfPHP/PHP-CS-Fixer [2]: https://gist.github.com/laravel-shift/cab527923ed2a109dda047b97d53c200
68 lines
1.8 KiB
PHP
68 lines
1.8 KiB
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Services\Saml;
|
|
use Illuminate\Support\Facades\Route;
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class SamlServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Bootstrap the application services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function boot()
|
|
{
|
|
$this->app->singleton(Saml::class, Saml::class);
|
|
|
|
Route::group(['namespace'=> 'App\Http\Controllers'], function () {
|
|
Route::group(['prefix'=> 'saml'], function () {
|
|
Route::get(
|
|
'metadata',
|
|
[
|
|
'as' => 'saml.metadata',
|
|
'uses' => 'Auth\SamlController@metadata', ]
|
|
);
|
|
|
|
Route::match(
|
|
['get', 'post'],
|
|
'acs',
|
|
[
|
|
'as' => 'saml.acs',
|
|
'uses' => 'Auth\SamlController@acs', ]
|
|
);
|
|
|
|
Route::get(
|
|
'sls',
|
|
[
|
|
'as' => 'saml.sls',
|
|
'uses' => 'Auth\SamlController@sls', ]
|
|
);
|
|
});
|
|
|
|
Route::get(
|
|
'login/saml',
|
|
[
|
|
'as' => 'saml.login',
|
|
'uses' => 'Auth\SamlController@login', ]
|
|
);
|
|
|
|
Route::group(['prefix' => 'admin', 'middleware' => ['web', 'auth', 'authorize:superuser']], function () {
|
|
Route::get('saml', ['as' => 'settings.saml.index', 'uses' => 'SettingsController@getSamlSettings']);
|
|
Route::post('saml', ['as' => 'settings.saml.save', 'uses' => 'SettingsController@postSamlSettings']);
|
|
});
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Register the application services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function register()
|
|
{
|
|
}
|
|
}
|