Skip to content

A free open source IT asset/license management system

Revised how saml sp info is displayed

Johnson Yi572185ac969d
diff --git a/resources/lang/en/admin/settings/general.php b/resources/lang/en/admin/settings/general.php
index 745c8e8da1..ecb4579228 100644
--- a/resources/lang/en/admin/settings/general.php
+++ b/resources/lang/en/admin/settings/general.php
@@ -120,6 +120,10 @@ return array(
'qr_text' => 'QR Code Text',
'saml_enabled' => 'SAML enabled',
'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_help' => 'You can specify the IdP metadata using a URL or XML file.',
'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_slo_label' => 'SAML Single Log Out',
'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_help' => 'You can specify additional settings to the onelogin/php-saml library. Use at your own risk.',
'setting' => 'Setting',
diff --git a/resources/views/settings/saml.blade.php b/resources/views/settings/saml.blade.php
index cd42a0143c..b5550d30f3 100644
--- a/resources/views/settings/saml.blade.php
+++ b/resources/views/settings/saml.blade.php
@@ -30,9 +30,6 @@
<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="col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2">
@@ -57,8 +54,30 @@
<div class="col-md-9">
{{ Form::checkbox('saml_enabled', '1', Request::old('saml_enabled', $setting->saml_enabled), ['class' => 'minimal '. $setting->demoMode, $setting->demoMode]) }}
{{ trans('admin/settings/general.saml_enabled') }}
+ <p class="help-block"></p>
@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
{!! $errors->first('saml_enabled', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div>
@@ -91,7 +110,7 @@
<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>') !!}
</div>
- </div><!-- AD Domain -->
+ </div>
<!-- SAML Force Login -->
<div class="form-group">