Revised how saml sp info is displayed

This commit is contained in:
Johnson Yi 2020-05-09 09:44:51 +10:00
parent 3d8fce50d0
commit 572185ac96
2 changed files with 29 additions and 6 deletions

View file

@ -120,6 +120,10 @@ return array(
'qr_text' => 'QR Code Text', 'qr_text' => 'QR Code Text',
'saml_enabled' => 'SAML enabled', 'saml_enabled' => 'SAML enabled',
'saml_integration' => 'SAML Integration', 'saml_integration' => 'SAML Integration',
'saml_sp_entityid' => 'Entity ID',
'saml_sp_acs_url' => 'Assertion Consumer Service (ACS) URL',
'saml_sp_sls_url' => 'Single Logout Service (SLS) URL',
'saml_sp_x509cert' => 'Public Certificate',
'saml_idp_metadata' => 'SAML IdP Metadata', 'saml_idp_metadata' => 'SAML IdP Metadata',
'saml_idp_metadata_help' => 'You can specify the IdP metadata using a URL or XML file.', 'saml_idp_metadata_help' => 'You can specify the IdP metadata using a URL or XML file.',
'saml_attr_mapping_username' => 'Attribute Mapping - Username', 'saml_attr_mapping_username' => 'Attribute Mapping - Username',
@ -129,7 +133,7 @@ return array(
'saml_forcelogin_help' => 'You can use \'/login?nosaml\' to get to the normal login page.', 'saml_forcelogin_help' => 'You can use \'/login?nosaml\' to get to the normal login page.',
'saml_slo_label' => 'SAML Single Log Out', 'saml_slo_label' => 'SAML Single Log Out',
'saml_slo' => 'Send a LogoutRequest to IdP on Logout', 'saml_slo' => 'Send a LogoutRequest to IdP on Logout',
'saml_slo_help' => 'This will cause the user to be first redirected to the Idp on logout. Leave unchecked if the IdP doesn\'t correctly support SP-initiated SAML SLO.', 'saml_slo_help' => 'This will cause the user to be first redirected to the IdP on logout. Leave unchecked if the IdP doesn\'t correctly support SP-initiated SAML SLO.',
'saml_custom_settings' => 'SAML Custom Settings', 'saml_custom_settings' => 'SAML Custom Settings',
'saml_custom_settings_help' => 'You can specify additional settings to the onelogin/php-saml library. Use at your own risk.', 'saml_custom_settings_help' => 'You can specify additional settings to the onelogin/php-saml library. Use at your own risk.',
'setting' => 'Setting', 'setting' => 'Setting',

View file

@ -30,9 +30,6 @@
<input type="password" name="password_fake" id="password_fake" value="" style="display:none;" /> <input type="password" name="password_fake" id="password_fake" value="" style="display:none;" />
@if (!empty($setting->saml_sp_x509cert))
{{ Form::hidden('saml_sp_x509cert', $setting->saml_sp_x509cert) }}
@endif
<div class="row"> <div class="row">
<div class="col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2"> <div class="col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2">
@ -57,8 +54,30 @@
<div class="col-md-9"> <div class="col-md-9">
{{ Form::checkbox('saml_enabled', '1', Request::old('saml_enabled', $setting->saml_enabled), ['class' => 'minimal '. $setting->demoMode, $setting->demoMode]) }} {{ Form::checkbox('saml_enabled', '1', Request::old('saml_enabled', $setting->saml_enabled), ['class' => 'minimal '. $setting->demoMode, $setting->demoMode]) }}
{{ trans('admin/settings/general.saml_enabled') }} {{ trans('admin/settings/general.saml_enabled') }}
<p class="help-block"></p>
@if ($setting->saml_enabled) @if ($setting->saml_enabled)
<p class="help-block"><a href="{{ route('saml.metadata') }}" target="_blank">{{ route('saml.metadata') }}</a></p> <!-- SAML SP Details -->
<!-- SAML SP Entity ID -->
{{ Form::label('saml_sp_entitiyid', trans('admin/settings/general.saml_sp_entityid')) }}
{{ Form::text('saml_sp_entitiyid', url('/'), ['class' => 'form-control', 'readonly']) }}
<br>
<!-- SAML SP ACS -->
{{ Form::label('saml_sp_acs_url', trans('admin/settings/general.saml_sp_acs_url')) }}
{{ Form::text('saml_sp_acs_url', route('saml.acs'), ['class' => 'form-control', 'readonly']) }}
<br>
<!-- SAML SP SLS -->
{{ Form::label('saml_sp_sls_url', trans('admin/settings/general.saml_sp_sls_url')) }}
{{ Form::text('saml_sp_sls_url', route('saml.sls'), ['class' => 'form-control', 'readonly']) }}
<br>
<!-- SAML SP Certificate -->
@if (!empty($setting->saml_sp_x509cert))
{{ Form::label('saml_sp_x509cert', trans('admin/settings/general.saml_sp_x509cert')) }}
{{ Form::textarea('saml_sp_x509cert', $setting->saml_sp_x509cert, ['class' => 'form-control', 'wrap' => 'off', 'readonly']) }}
<br>
@endif
<p class="help-block">
<a href="{{ route('saml.metadata') }}" target="_blank" class="btn btn-default" style="margin-right: 5px;">View Metadata</a>
</p>
@endif @endif
{!! $errors->first('saml_enabled', '<span class="alert-msg" aria-hidden="true">:message</span>') !!} {!! $errors->first('saml_enabled', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div> </div>
@ -91,7 +110,7 @@
<p class="help-block">{{ trans('admin/settings/general.saml_attr_mapping_username_help') }}</p> <p class="help-block">{{ trans('admin/settings/general.saml_attr_mapping_username_help') }}</p>
{!! $errors->first('saml_attr_mapping_username', '<span class="alert-msg" aria-hidden="true">:message</span>') !!} {!! $errors->first('saml_attr_mapping_username', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div> </div>
</div><!-- AD Domain --> </div>
<!-- SAML Force Login --> <!-- SAML Force Login -->
<div class="form-group"> <div class="form-group">