From b8479c6fb3dfff471a395baef0ebeb4a2d8af0fb Mon Sep 17 00:00:00 2001
From: Thijs Kinkhorst <thijs@kinkhorst.com>
Date: Fri, 27 Aug 2021 10:47:47 +0000
Subject: [PATCH] Boolean values are preferred lowercase

---
 docs/simplesamlphp-metadata-endpoints.md      |  2 +-
 modules/saml/docs/nameid.md                   | 24 +++++++++----------
 modules/saml/docs/sp.md                       | 24 +++++++++----------
 tests/modules/saml/lib/Auth/Source/SPTest.php |  4 ++--
 4 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/docs/simplesamlphp-metadata-endpoints.md b/docs/simplesamlphp-metadata-endpoints.md
index 7200c9187..aeeff30bf 100644
--- a/docs/simplesamlphp-metadata-endpoints.md
+++ b/docs/simplesamlphp-metadata-endpoints.md
@@ -46,7 +46,7 @@ Array of arrays
     'AssertionConsumerService' => [
         [
             'index' => 1,
-            'isDefault' => TRUE,
+            'isDefault' => true,
             'Location' => 'https://sp.example.org/ACS',
             'Binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST',
         ],
diff --git a/modules/saml/docs/nameid.md b/modules/saml/docs/nameid.md
index fb7b77c2d..f0b3f77d8 100644
--- a/modules/saml/docs/nameid.md
+++ b/modules/saml/docs/nameid.md
@@ -10,18 +10,18 @@ Common options
 `NameQualifier`
 :   The NameQualifier attribute for the generated NameID.
     This can be a string that is used as the value directly.
-    It can also be `TRUE`, in which case we use the IdP entity ID as the NameQualifier.
-    If it is `FALSE`, no NameQualifier will be included.
+    It can also be `true`, in which case we use the IdP entity ID as the NameQualifier.
+    If it is `false`, no NameQualifier will be included.
 
-:   The default is `FALSE`, which means that we will not include a NameQualifier by default.
+:   The default is `false`, which means that we will not include a NameQualifier by default.
 
 `SPNameQualifier`
 :   The SPNameQualifier attribute for the generated NameID.
     This can be a string that is used as the value directly.
-    It can also be `TRUE`, in which case we use the SP entity ID as the SPNameQualifier.
-    If it is `FALSE`, no SPNameQualifier will be included.
+    It can also be `true`, in which case we use the SP entity ID as the SPNameQualifier.
+    If it is `false`, no SPNameQualifier will be included.
 
-:   The default is `TRUE`, which means that we will use the SP entity ID.
+:   The default is `true`, which means that we will use the SP entity ID.
 
 
 `saml:AttributeNameID`
@@ -77,21 +77,21 @@ See the `store.type` configuration option in `config.php`.
 
 `allowUnspecified`
 :   Whether a persistent NameID should be created if the SP does not specify any NameID format in the request.
-    The default is `FALSE`.
+    The default is `false`.
 
 `allowDifferent`
 :   Whether a persistent NameID should be created if there are only other NameID formats specified in the request or the SP's metadata.
-    The default is `FALSE`.
+    The default is `false`.
 
 `alwaysCreate`
 :   Whether to ignore an explicit `AllowCreate="false"` in the authentication request's NameIDPolicy.
-    The default is `FALSE`, which will only create new NameIDs when the SP specifies `AllowCreate="true"` in the authentication request.
+    The default is `false`, which will only create new NameIDs when the SP specifies `AllowCreate="true"` in the authentication request.
 
 `store`
 :   An array of database options passed to `\SimpleSAML\Database`, keys prefixed with `database.`.
     The default is `[]`, which uses the global SQL datastore.
 
-Setting both `allowUnspecified` and `alwaysCreate` to `TRUE` causes `saml:SQLPersistentNameID` to behave like `saml:PersistentNameID` (and other NameID generation filters), at the expense of creating unnecessary entries in the SQL datastore.
+Setting both `allowUnspecified` and `alwaysCreate` to `true` causes `saml:SQLPersistentNameID` to behave like `saml:PersistentNameID` (and other NameID generation filters), at the expense of creating unnecessary entries in the SQL datastore.
 
 
 `saml:PersistentNameID2TargetedID`
@@ -111,7 +111,7 @@ This can be used to set the `eduPersonTargetedID`-attribute to the same value as
 
 `nameId`
 :   Whether the generated attribute should be an saml:NameID element.
-    The default is `TRUE`.
+    The default is `true`.
 
 
 
@@ -159,7 +159,7 @@ Generating Persistent NameID and eduPersonTargetedID.
         60 => [
             'class' => 'saml:PersistentNameID2TargetedID',
             'attribute' => 'eduPersonTargetedID', // The default
-            'nameId' => TRUE, // The default
+            'nameId' => true, // The default
         ],
         // Use OID attribute names.
         90 => [
diff --git a/modules/saml/docs/sp.md b/modules/saml/docs/sp.md
index efa40a0f6..f441b262b 100644
--- a/modules/saml/docs/sp.md
+++ b/modules/saml/docs/sp.md
@@ -60,7 +60,7 @@ All these parameters override the equivalent option from the configuration.
 
 `saml:NameIDPolicy`
 :   The format of the NameID we request from the IdP: an array in the form of
-    `[ 'Format' => the format, 'allowcreate' => true or false ]`.
+    `[ 'Format' => the format, 'AllowCreate' => true or false ]`.
     Set to `false` instead of an array to omit sending any specific NameIDPolicy
     in the AuthnRequest.
 
@@ -104,8 +104,8 @@ Options
     * `urn:oasis:names:tc:SAML:2.0:profiles:holder-of-key:SSO:browser`
 
 `assertion.encryption`
-:   Whether assertions received by this SP must be encrypted. The default value is `FALSE`.
-    If this option is set to `TRUE`, unencrypted assertions will be rejected.
+:   Whether assertions received by this SP must be encrypted. The default value is `false`.
+    If this option is set to `true`, unencrypted assertions will be rejected.
 
 :   Note that this option can be overridden for a specific IdP in saml20-idp-remote.
 
@@ -207,8 +207,8 @@ Options
 :   *Note*: For this to be added to the metadata, you must also specify the `attributes` and `name` options.
 
 `disable_scoping`
-:    Whether sending of samlp:Scoping elements in authentication requests should be suppressed. The default value is `FALSE`.
-     When set to `TRUE`, no scoping elements will be sent. This does not comply with the SAML2 specification, but allows
+:    Whether sending of samlp:Scoping elements in authentication requests should be suppressed. The default value is `false`.
+     When set to `true`, no scoping elements will be sent. This does not comply with the SAML2 specification, but allows
      interoperability with ADFS which [does not support Scoping elements](https://docs.microsoft.com/en-za/azure/active-directory/develop/active-directory-single-sign-on-protocol-reference#scoping).
 
 :   Note that this option also exists in the IdP remote configuration. An entry
@@ -260,7 +260,7 @@ Options
 
 `nameid.encryption`
 :   Whether NameIDs sent from this SP should be encrypted. The default
-    value is `FALSE`.
+    value is `false`.
 
 :   Note that this option can be set for each IdP in the [IdP-remote metadata](./simplesamlphp-reference-idp-remote).
 
@@ -315,13 +315,13 @@ Options
 
 
 `redirect.sign`
-:   Whether authentication requests, logout requests and logout responses sent from this SP should be signed. The default is `FALSE`.
+:   Whether authentication requests, logout requests and logout responses sent from this SP should be signed. The default is `false`.
     If set, the `AuthnRequestsSigned` attribute of the `SPSSODescriptor` element in SAML 2.0 metadata will contain its value. This
     option takes precedence over the `sign.authnrequest` option in any metadata generated for this SP.
 
 
 `redirect.validate`
-:   Whether logout requests and logout responses received by this SP should be validated. The default is `FALSE`.
+:   Whether logout requests and logout responses received by this SP should be validated. The default is `false`.
 
 
 `RegistrationInfo`
@@ -336,7 +336,7 @@ Options
 :   A file with a certificate _and_ private key that should be used when issuing SOAP requests from this SP.
     If this option isn't specified, the SP private key and certificate will be used.
 
-:   This option can also be set to `FALSE`, in which case no client certificate will be used.
+:   This option can also be set to `false`, in which case no client certificate will be used.
 
 `saml.SOAPClient.privatekey_pass`
 :   The passphrase of the privatekey in `saml.SOAPClient.certificate`.
@@ -393,7 +393,7 @@ Options
 
 
 `WantAssertionsSigned`
-:   Whether assertions received by this SP must be signed. The default value is `FALSE`.
+:   Whether assertions received by this SP must be signed. The default value is `false`.
     The value set for this option will be used to set the `WantAssertionsSigned` attribute of the `SPSSODescriptor` element in
     the exported SAML 2.0 metadata.
 
@@ -433,8 +433,8 @@ Here we will list some examples for this authentication source.
         'certificate' => 'example.crt',
         'privatekey' => 'example.key',
         'privatekey_pass' => 'secretpassword',
-        'redirect.sign' => TRUE,
-        'redirect.validate' => TRUE,
+        'redirect.sign' => true,
+        'redirect.validate' => true,
     ],
 
 
diff --git a/tests/modules/saml/lib/Auth/Source/SPTest.php b/tests/modules/saml/lib/Auth/Source/SPTest.php
index 6b3804551..e00a438ed 100644
--- a/tests/modules/saml/lib/Auth/Source/SPTest.php
+++ b/tests/modules/saml/lib/Auth/Source/SPTest.php
@@ -727,7 +727,7 @@ class SPTest extends ClearStateTestCase
             'AssertionConsumerService' => [
                 [
                     'index' => 1,
-                    'isDefault' => TRUE,
+                    'isDefault' => true,
                     'Location' => 'https://sp.example.org/ACS',
                     'Binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST',
                 ],
@@ -1227,7 +1227,7 @@ class SPTest extends ClearStateTestCase
             'AssertionConsumerService' => [
                 [
                     'index' => 1,
-                    'isDefault' => TRUE,
+                    'isDefault' => true,
                     'Location' => 'https://sp.example.org/ACS',
                     'Binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST',
                 ],
-- 
GitLab