Handle logout route names

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2022-08-01 16:17:40 -07:00
parent 3e48f436af
commit af7ccf3beb
4 changed files with 7 additions and 7 deletions

View file

@ -142,6 +142,6 @@ class SamlController extends Controller
return view('errors.403');
}
return redirect()->route('logout')->with(['saml_logout' => true,'saml_slo_redirect_url' => $sloUrl]);
return redirect()->route('logout.get')->with(['saml_logout' => true,'saml_slo_redirect_url' => $sloUrl]);
}
}

View file

@ -42,13 +42,13 @@
<button class="btn btn-lg btn-primary btn-block">{{ trans('general.submit') }}</button>
</div>
<div class="col-md-12 col-sm-12 col-xs-12 text-right" style="padding-top: 10px;">
<a href="{{ route('logout') }}" onclick="document.getElementById('logout-form').submit(); return false;">
<a href="{{ route('logout.get') }}" onclick="document.getElementById('logout-form').submit(); return false;">
{{ trans('general.cancel') }}
</a>
</div>
</div>
</form>
<form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
<form id="logout-form" action="{{ route('logout.post') }}" method="POST" style="display: none;">
{{ csrf_field() }}
</form>

View file

@ -354,11 +354,11 @@
<li class="divider"></li>
<li>
<a href="{{ route('logout') }}" onclick="event.preventDefault(); document.getElementById('logout-form').submit();">
<a href="{{ route('logout.get') }}" onclick="event.preventDefault(); document.getElementById('logout-form').submit();">
<i class="fa fa-sign-out fa-fw"></i> {{ trans('general.logout') }}
</a>
<form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
<form id="logout-form" action="{{ route('logout.post') }}" method="POST" style="display: none;">
{{ csrf_field() }}
</form>

View file

@ -467,12 +467,12 @@ Route::group(['middleware' => 'web'], function () {
Route::get(
'logout',
[LoginController::class, 'logout']
)->name('logout');
)->name('logout.get');
Route::post(
'logout',
[LoginController::class, 'logout']
)->name('logout');
)->name('logout.post');
});
//Auth::routes();