File tree Expand file tree Collapse file tree 4 files changed +41
-8
lines changed
Expand file tree Collapse file tree 4 files changed +41
-8
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ class SAMLSettings {
5959 'saml-attribute-mapping-group_mapping_prefix ' ,
6060 'saml-user-filter-reject_groups ' ,
6161 'saml-user-filter-require_groups ' ,
62+ 'sp-entityId ' ,
6263 'sp-x509cert ' ,
6364 'sp-name-id-format ' ,
6465 'sp-privateKey ' ,
@@ -141,7 +142,9 @@ public function getOneLoginSettingsArray(int $idp): array {
141142 // "sloWebServerDecode" is not expected to be passed to the OneLogin class
142143 ],
143144 'sp ' => [
144- 'entityId ' => $ this ->urlGenerator ->linkToRouteAbsolute ('user_saml.SAML.getMetadata ' ),
145+ 'entityId ' => (array_key_exists ('sp-entityId ' , $ this ->configurations [$ idp ]) && trim ($ this ->configurations [$ idp ]['sp-entityId ' ]) != '' )
146+ ? $ this ->configurations [$ idp ]['sp-entityId ' ]
147+ : $ this ->urlGenerator ->linkToRouteAbsolute ('user_saml.SAML.getMetadata ' ),
145148 'assertionConsumerService ' => [
146149 'url ' => $ this ->urlGenerator ->linkToRouteAbsolute ('user_saml.SAML.assertionConsumerService ' ),
147150 ],
Original file line number Diff line number Diff line change @@ -38,8 +38,21 @@ public function getForm() {
3838 ];
3939 }
4040 $ serviceProviderFields = [
41- 'x509cert ' => $ this ->l10n ->t ('X.509 certificate of the Service Provider ' ),
42- 'privateKey ' => $ this ->l10n ->t ('Private key of the Service Provider ' ),
41+ 'x509cert ' => [
42+ 'text ' => $ this ->l10n ->t ('X.509 certificate of the Service Provider ' ),
43+ 'type ' => 'text ' ,
44+ 'required ' => false ,
45+ ],
46+ 'privateKey ' => [
47+ 'text ' => $ this ->l10n ->t ('Private key of the Service Provider ' ),
48+ 'type ' => 'text ' ,
49+ 'required ' => false ,
50+ ],
51+ 'entityId ' => [
52+ 'text ' => $ this ->l10n ->t ('Service Provider EntityId (optional) ' ),
53+ 'type ' => 'line ' ,
54+ 'required ' => false ,
55+ ]
4356 ];
4457 $ securityOfferFields = [
4558 'nameIdEncrypted ' => $ this ->l10n ->t ('Indicates that the nameID of the <samlp:logoutRequest> sent by this SP will be encrypted. ' ),
Original file line number Diff line number Diff line change 121121 } ?> ><?php p ($ value ['label ' ]) ?> </option>
122122 <?php endforeach ; ?>
123123 </select>
124- <?php foreach ($ _ ['sp ' ] as $ key => $ text ): ?>
124+ <?php foreach ($ _ ['sp ' ] as $ key => $ attribute ): ?>
125125 <p>
126- <label class="user-saml-standalone-label" for="user-saml-<?php p ($ key ) ?> "><?php p ($ text ) ?> </label><br/>
127- <textarea id="user-saml-<?php p ($ key ) ?> " name="<?php p ($ key ) ?> "><?php p ($ _ ['config ' ]['sp- ' . $ key ] ?? '' ) ?> </textarea>
126+ <label class="user-saml-standalone-label" for="user-saml-<?php p ($ key ) ?> "><?php p ($ attribute ['text ' ]) ?> </label><br/>
127+ <?php if ($ attribute ['type ' ] === 'line ' ): ?>
128+ <input id="user-saml-<?php p ($ key ) ?> " name="<?php p ($ key ) ?> " value="<?php p ($ _ ['config ' ]['sp- ' . $ key ] ?? '' ) ?> " type="text" <?php if (isset ($ attribute ['required ' ]) && $ attribute ['required ' ] === true ): ?> class="required"<?php endif ;?> />
129+ <?php else : ?>
130+ <textarea id="user-saml-<?php p ($ key ) ?> " name="<?php p ($ key ) ?> " <?php if (isset ($ attribute ['required ' ]) && $ attribute ['required ' ] === true ): ?> class="required"<?php endif ;?> ><?php p ($ _ ['config ' ]['sp- ' . $ key ] ?? '' ) ?> </textarea>
131+ <?php endif ; ?>
128132 </p>
129133 <?php endforeach ; ?>
130134 </div>
Original file line number Diff line number Diff line change @@ -53,8 +53,21 @@ public function formDataProvider() {
5353 });
5454
5555 $ serviceProviderFields = [
56- 'x509cert ' => 'X.509 certificate of the Service Provider ' ,
57- 'privateKey ' => 'Private key of the Service Provider ' ,
56+ 'x509cert ' => [
57+ 'text ' => 'X.509 certificate of the Service Provider ' ,
58+ 'type ' => 'text ' ,
59+ 'required ' => false ,
60+ ],
61+ 'privateKey ' => [
62+ 'text ' => 'Private key of the Service Provider ' ,
63+ 'type ' => 'text ' ,
64+ 'required ' => false ,
65+ ],
66+ 'entityId ' => [
67+ 'text ' => 'Service Provider EntityId (optional) ' ,
68+ 'type ' => 'line ' ,
69+ 'required ' => false ,
70+ ]
5871 ];
5972 $ securityOfferFields = [
6073 'nameIdEncrypted ' => 'Indicates that the nameID of the <samlp:logoutRequest> sent by this SP will be encrypted. ' ,
You can’t perform that action at this time.
0 commit comments