diff --git a/modules/core/docs/authproc_attributeadd.md b/modules/core/docs/authproc_attributeadd.md index ac113d69dc0f60f9b7b333bb8137aa460ef016b1..a63452c522b21425cc8ebd57e5f0ddabdc02b108 100644 --- a/modules/core/docs/authproc_attributeadd.md +++ b/modules/core/docs/authproc_attributeadd.md @@ -12,38 +12,38 @@ Examples Add a single-valued attributes: - 'authproc' => array( - 50 => array( + 'authproc' => [ + 50 => [ 'class' => 'core:AttributeAdd', - 'source' => array('myidp'), - ), - ), + 'source' => ['myidp'], + ], + ], Add a multi-valued attribute: - 'authproc' => array( - 50 => array( + 'authproc' => [ + 50 => [ 'class' => 'core:AttributeAdd', - 'groups' => array('users', 'members'), - ), - ), + 'groups' => ['users', 'members'], + ], + ], Add multiple attributes: - 'authproc' => array( - 50 => array( + 'authproc' => [ + 50 => [ 'class' => 'core:AttributeAdd', 'eduPersonPrimaryAffiliation' => 'student', - 'eduPersonAffiliation' => array('student', 'employee', 'members'), - ), - ), + 'eduPersonAffiliation' => ['student', 'employee', 'members'], + ], + ], Replace an existing attributes: - 'authproc' => array( - 50 => array( + 'authproc' => [ + 50 => [ 'class' => 'core:AttributeAdd', '%replace', - 'uid' => array('guest'), - ), - ), + 'uid' => ['guest'], + ], + ], diff --git a/modules/core/docs/authproc_attributealter.md b/modules/core/docs/authproc_attributealter.md index de4b47601dee593c6588e8b8762a8d8af494a868..84d3d6e06239e7d65e576dad4ca44ba98966f8aa 100644 --- a/modules/core/docs/authproc_attributealter.md +++ b/modules/core/docs/authproc_attributealter.md @@ -1,5 +1,5 @@ `core:AttributeAlter` -========== +===================== This filter can be used to substitute and replace different parts of the attribute values based on regular expressions. It can also be used to create new attributes based on existing values, or even to remove blacklisted values from diff --git a/modules/core/docs/authproc_attributecopy.md b/modules/core/docs/authproc_attributecopy.md index 6f663d395006efc064c450ff6a748dd2337f7216..976e8ee4c295e8c6690f8ca87f70f0e9b47f8b89 100644 --- a/modules/core/docs/authproc_attributecopy.md +++ b/modules/core/docs/authproc_attributecopy.md @@ -1,5 +1,5 @@ `core:AttributeCopy` -=================== +==================== Filter that copies attributes. @@ -9,18 +9,18 @@ Examples Copy a single attribute (user's `uid` will be copied to the user's `username`): - 'authproc' => array( - 50 => array( + 'authproc' => [ + 50 => [ 'class' => 'core:AttributeCopy', 'uid' => 'username', - ), - ), + ], + ], Copy a single attribute to more then one attribute (user's `uid` will be copied to the user's `username` and to `urn:mace:dir:attribute-def:uid`) - 'authproc' => array( - 50 => array( + 'authproc' => [ + 50 => [ 'class' => 'core:AttributeCopy', - 'uid' => array('username', 'urn:mace:dir:attribute-def:uid'), - ), - ), + 'uid' => ['username', 'urn:mace:dir:attribute-def:uid'], + ], + ], diff --git a/modules/core/docs/authproc_attributelimit.md b/modules/core/docs/authproc_attributelimit.md index 73c4406efd4875c5c72ea8503ea32adcc3036c45..220fd54d7cf030b1dd9daa7ec6f821fcd723039c 100644 --- a/modules/core/docs/authproc_attributelimit.md +++ b/modules/core/docs/authproc_attributelimit.md @@ -15,114 +15,114 @@ Here you will find a few examples on how to use this simple module: Limit to the `cn` and `mail` attribute: - 'authproc' => array( - 50 => array( + 'authproc' => [ + 50 => [ 'class' => 'core:AttributeLimit', 'cn', 'mail' - ), - ), + ], + ], Allow `eduPersonTargetedID` and `eduPersonAffiliation` by default, but allow the metadata to override the limitation. - 'authproc' => array( - 50 => array( + 'authproc' => [ + 50 => [ 'class' => 'core:AttributeLimit', - 'default' => TRUE, + 'default' => true, 'eduPersonTargetedID', 'eduPersonAffiliation', - ), - ), + ], + ], Only allow specific values for an attribute. - 'authproc' => array( - 50 => array( + 'authproc' => [ + 50 => [ 'class' => 'core:AttributeLimit', - 'eduPersonEntitlement' => array('urn:x-surfnet:surf.nl:surfdrive:quota:100') - ), - ), + 'eduPersonEntitlement' => ['urn:mace:surf.nl:surfdrive:quota:100'] + ], + ], Only allow specific values for an attribute ignoring case. - 'authproc' => array( - 50 => array( + 'authproc' => [ + 50 => [ 'class' => 'core:AttributeLimit', - 'eduPersonEntitlement' => array( + 'eduPersonEntitlement' => [ 'ignoreCase' => true, - 'URN:x-surfnet:surf.nl:SURFDRIVE:quota:100' - ) - ), - ), + 'URN:mace:surf.nl:SURFDRIVE:quota:100' + ] + ], + ], Only allow specific values for an attribute that match a regex pattern - 'authproc' => array( - 50 => array( + 'authproc' => [ + 50 => [ 'class' => 'core:AttributeLimit', - 'eduPersonEntitlement' => array( + 'eduPersonEntitlement' => [ 'regex' => true, - '/^urn:x-surfnet:surf/', + '/^urn:mace:surf/', '/^urn:x-IGNORE_Case/i', - ) - ), - ), + ] + ], + ], Don't allow any attributes by default, but allow the metadata to override it. - 'authproc' => array( - 50 => array( + 'authproc' => [ + 50 => [ 'class' => 'core:AttributeLimit', - 'default' => TRUE, - ), - ), + 'default' => true, + ], + ], In order to just use the list of attributes defined in the metadata for each service provider, configure the module like this: - 'authproc' => array( + 'authproc' => [ 50 => 'core:AttributeLimit', - ), + ], Then, add the allowed attributes to each service provider metadata, in the `attributes` option: - $metadata['https://saml2sp.example.org'] = array( + $metadata['https://saml2sp.example.org'] = [ 'AssertionConsumerService' => 'https://saml2sp.example.org/simplesaml/module.php/saml/sp/saml2-acs.php/default-sp', 'SingleLogoutService' => 'https://saml2sp.example.org/simplesaml/module.php/saml/sp/saml2-logout.php/default-sp', ... - 'attributes' => array('cn', 'mail'), + 'attributes' => ['cn', 'mail'], ... - ); + ]; Now, let's look to a couple of examples on how to filter out attribute values. First, allow only the entitlements known to be used by a service provider (among other attributes): - $metadata['https://saml2sp.example.org'] = array( + $metadata['https://saml2sp.example.org'] = [ 'AssertionConsumerService' => 'https://saml2sp.example.org/simplesaml/module.php/saml/sp/saml2-acs.php/default-sp', 'SingleLogoutService' => 'https://saml2sp.example.org/simplesaml/module.php/saml/sp/saml2-logout.php/default-sp', ... - 'attributes' => array( + 'attributes' => [ 'uid', 'mail', - 'eduPersonEntitlement' => array( + 'eduPersonEntitlement' => [ 'urn:mace:example.org:admin', 'urn:mace:example.org:user', - ), - ), + ], + ], ... - ); + ]; Now, an example on how to normalize the affiliations sent from an identity provider, to make sure that no custom values ever reach the service providers. Bear in mind that this configuration can be overridden by metadata: - 'authproc' => array( + 'authproc' => [ 50 => 'core:AttributeLimit', - 'default' => TRUE, - 'eduPersonAffiliation' => array( + 'default' => true, + 'eduPersonAffiliation' => [ 'student', 'staff', 'member', 'faculty', 'employee', 'affiliate', - ), - ), + ], + ], diff --git a/modules/core/docs/authproc_attributemap.md b/modules/core/docs/authproc_attributemap.md index 09364dd514969878e660284dd0c20fb6b96622eb..d463ba4f44e4e630d8bb8ab60f89052df5cede15 100644 --- a/modules/core/docs/authproc_attributemap.md +++ b/modules/core/docs/authproc_attributemap.md @@ -15,43 +15,43 @@ Examples Attribute maps embedded as parameters: - 'authproc' => array( - 50 => array( + 'authproc' => [ + 50 => [ 'class' => 'core:AttributeMap', 'mail' => 'email', 'uid' => 'user' - 'cn' => array('name', 'displayName'), - ), - ), + 'cn' => ['name', 'displayName'], + ], + ], Attribute map in separate file: - 'authproc' => array( - 50 => array( + 'authproc' => [ + 50 => [ 'class' => 'core:AttributeMap', 'name2oid', - ), - ), + ], + ], This filter will use the map file from `simplesamlphp/attributemap/name2oid.php`. Attribute map in a file contained in a module: - 'authproc' => array( - 50 => array( + 'authproc' => [ + 50 => [ 'class' => 'core:AttributeMap', 'module:src2dst' - ), - ), + ], + ], This filter will use the map file from `simplesamlphp/modules/module/attributemap/src2dst.php`. Duplicate attributes based on a map file: - 'authproc' => array( - 50 => array( + 'authproc' => [ + 50 => [ 'class' => 'core:AttributeMap', 'name2urn', 'name2oid', '%duplicate', - ), - ), + ], + ], diff --git a/modules/core/docs/authproc_attributevaluemap.md b/modules/core/docs/authproc_attributevaluemap.md index eb571a4faae993be5ad0a81d5db546db9a0f72d0..a3925495d2e16d95700eef580ed6cc5b1276422d 100644 --- a/modules/core/docs/authproc_attributevaluemap.md +++ b/modules/core/docs/authproc_attributevaluemap.md @@ -1,5 +1,5 @@ `core:AttributeValueMap` -=================== +======================== Filter that creates a target attribute based on one or more value(s) in source attribute. @@ -16,69 +16,69 @@ either '`cn=student,o=some,o=organization,dc=org`' or '`cn=student,o=other,o=org The '`memberOf`' attribute will be removed (use `%keep`, to keep it) and existing values in '`eduPersonAffiliation`' will be merged (use `%replace` to replace them). - 'authproc' => array( - 50 => array( + 'authproc' => [ + 50 => [ 'class' => 'core:AttributeValueMap', 'sourceattribute' => 'memberOf', 'targetattribute' => 'eduPersonAffiliation', - 'values' => array( - 'student' => array( + 'values' => [ + 'student' => [ 'cn=student,o=some,o=organization,dc=org', 'cn=student,o=other,o=organization,dc=org', - ), - ), - ), - ) + ], + ], + ], + ], ### Multiple assignments Add `student`, `employee` and `both` affiliation based on LDAP groupmembership in the `memberOf` attribute. - 'authproc' => array( - 50 => array( + 'authproc' => [ + 50 => [ 'class' => 'core:AttributeValueMap', 'sourceattribute' => 'memberOf', 'targetattribute' => 'eduPersonAffiliation', - 'values' => array( - 'student' => array( + 'values' => [ + 'student' => [ 'cn=student,o=some,o=organization,dc=org', 'cn=student,o=other,o=organization,dc=org', - ), - 'employee' => array( + ], + 'employee' => [ 'cn=employees,o=some,o=organization,dc=org', 'cn=employee,o=other,o=organization,dc=org', 'cn=workers,o=any,o=organization,dc=org', - ), - 'both' => array( + ], + 'both' => [ 'cn=student,o=some,o=organization,dc=org', 'cn=student,o=other,o=organization,dc=org', 'cn=employees,o=some,o=organization,dc=org', 'cn=employee,o=other,o=organization,dc=org', 'cn=workers,o=any,o=organization,dc=org', - ), - ), - ), - ) + ], + ], + ], + ], ### Replace and Keep Replace any existing '`affiliation`' attribute values and keep the '`groups`' attribute. - 'authproc' => array( - 50 => array( + 'authproc' => [ + 50 => [ 'class' => 'core:AttributeValueMap', 'sourceattribute' => 'groups', 'targetattribute' => 'affiliation', '%replace', '%keep', - 'values' => array( - 'student' => array( + 'values' => [ + 'student' => [ 'cn=student,o=some,o=organization,dc=org', 'cn=student,o=other,o=organization,dc=org', - ), - 'employee' => array( + ], + 'employee' => [ 'cn=employees,o=some,o=organization,dc=org', 'cn=employee,o=other,o=organization,dc=org', 'cn=workers,o=any,o=organization,dc=org', - ), - ), - ), - ) + ], + ], + ], + ], diff --git a/modules/core/docs/authproc_cardinality.md b/modules/core/docs/authproc_cardinality.md index 97b73f86619cb70db8e4c104b2f8cf52e9e9fe46..14886094e4bde8be11db0f8a9149e47277ee6d20 100644 --- a/modules/core/docs/authproc_cardinality.md +++ b/modules/core/docs/authproc_cardinality.md @@ -30,20 +30,20 @@ Examples Require at least one `givenName`, no more than two email addresses, and between two and four values for `eduPersonScopedAffiliation`. - 'authproc' => array( - 50 => array( + 'authproc' => [ + 50 => [ 'class' => 'core:Cardinality', - 'givenName' => array('min' => 1), - 'mail' => array('max' => 2), - 'eduPersonScopedAffiliation' => array('min' => 2, 'max' => 4), - ), - ), + 'givenName' => ['min' => 1], + 'mail' => ['max' => 2[, + 'eduPersonScopedAffiliation' => ['min' => 2, 'max' => 4], + ], + ], Use the shorthand notation for min, max: - 'authproc' => array( - 50 => array( + 'authproc' => [ + 50 => [ 'class' => 'core:Cardinality', - 'mail' => array(0, 2), - ), - ), + 'mail' => [0, 2], + ], + ], diff --git a/modules/core/docs/authproc_cardinalitysingle.md b/modules/core/docs/authproc_cardinalitysingle.md index 62d2fa7998b666f9d1a0ae1ed63f0d1452e986bd..0242ee1b0d289cf19444d4dbeeea200389417023 100644 --- a/modules/core/docs/authproc_cardinalitysingle.md +++ b/modules/core/docs/authproc_cardinalitysingle.md @@ -32,10 +32,10 @@ Examples Abort with an error if any attribute defined as single-valued in the eduPerson or SCHAC schemas exists and has more than one value: - 'authproc' => array( - 50 => array( + 'authproc' => [ + 50 => [ 'class' => 'core:CardinalitySingle', - 'singleValued' => array( + 'singleValued' => [ /* from eduPerson (internet2-mace-dir-eduperson-201602) */ 'eduPersonOrgDN', 'eduPersonPrimaryAffiliation', 'eduPersonPrimaryOrgUnitDN', 'eduPersonPrincipalName', 'eduPersonUniqueId', @@ -45,44 +45,44 @@ Abort with an error if any attribute defined as single-valued in the eduPerson o 'schacMotherTongue', 'schacGender', 'schacDateOfBirth', 'schacPlaceOfBirth', 'schacPersonalTitle', 'schacHomeOrganization', 'schacHomeOrganizationType', 'schacExpiryDate', - ), - ), - ), + ], + ], + ], Abort if multiple values are received for `eduPersonPrincipalName`, but take the first value for `eduPersonPrimaryAffiliation`: - 'authproc' => array( - 50 => array( + 'authproc' => [ + 50 => [ 'class' => 'core:CardinalitySingle', - 'singleValued' => array('eduPersonPrincipalName'), - 'firstValue' => array('eduPersonPrimaryAffiliation'), - ), - ), - ), + 'singleValued' => ['eduPersonPrincipalName'], + 'firstValue' => ['eduPersonPrimaryAffiliation'], + ], + ], + ], Construct `eduPersonPrimaryAffiliation` using the first value in `eduPersonAffiliation`: - 'authproc' => array( - 50 => array( + 'authproc' => [ + 50 => [ 'class' => 'core:AttributeCopy', 'eduPersonAffiliation' => 'eduPersonPrimaryAffiliation', - ), - 51 => array( + ], + 51 => [ 'class' => 'core:CardinalitySingle', - 'firstValue' => array('eduPersonPrimaryAffiliation'), - ), - ), + 'firstValue' => ['eduPersonPrimaryAffiliation'], + ], + ], Construct a single, comma-separated value version of `eduPersonAffiliation`: - 'authproc' => array( - 50 => array( + 'authproc' => [ + 50 => [ 'class' => 'core:AttributeCopy', 'eduPersonAffiliation' => 'eduPersonAffiliationWithCommas', - ), - 51 => array( + ], + 51 => [ 'class' => 'core:CardinalitySingle', - 'flatten' => array('eduPersonAffiliationWithCommas'), + 'flatten' => ['eduPersonAffiliationWithCommas'], 'flattenWith' => ',', - ), - ), + ], + ], diff --git a/modules/core/docs/authproc_generategroups.md b/modules/core/docs/authproc_generategroups.md index b09e07fff8f1fa7f4e0964a23e1e213d9881ac72..4d472eccae3cb3dc2dedcebca2ed3a8e0ff26212 100644 --- a/modules/core/docs/authproc_generategroups.md +++ b/modules/core/docs/authproc_generategroups.md @@ -33,19 +33,19 @@ Examples Default attributes: - 'authproc' => array( - 50 => array( + 'authproc' => [ + 50 => [ 'class' => 'core:GenerateGroups', - ), - ), + ], + ], Custom attributes: - 'authproc' => array( - 50 => array( + 'authproc' => [ + 50 => [ 'class' => 'core:GenerateGroups', 'someAttribute', 'someOtherAttribute', - ), - ), + ], + ], diff --git a/modules/core/docs/authproc_languageadaptor.md b/modules/core/docs/authproc_languageadaptor.md index c6d681db8d651649c4b5788b1e39072ba63e5fe0..f9efbd742008d515635652b522930fb54c12050f 100644 --- a/modules/core/docs/authproc_languageadaptor.md +++ b/modules/core/docs/authproc_languageadaptor.md @@ -26,17 +26,17 @@ Examples Default attribute (`preferredLanguage`): - 'authproc' => array( - 50 => array( + 'authproc' => [ + 50 => [ 'class' => 'core:LanguageAdaptor', - ), - ), + ], + ], Custon attribute: - 'authproc' => array( - 50 => array( + 'authproc' => [ + 50 => [ 'class' => 'core:LanguageAdaptor', 'attributename' => 'lang', - ), - ), + ], + ], diff --git a/modules/core/docs/authproc_php.md b/modules/core/docs/authproc_php.md index 3f8125bd1b95386f6b7cf8c089dde3c4e7cb3efb..eaef2d7e6ac5c22c7eb43f4c343402ab50c7cfa1 100644 --- a/modules/core/docs/authproc_php.md +++ b/modules/core/docs/authproc_php.md @@ -25,7 +25,7 @@ Examples Add the `mail` attribute based on the user's `uid` attribute: - 10 => array( + 10 => [ 'class' => 'core:PHP', 'code' => ' if (empty($attributes["uid"])) { @@ -34,25 +34,25 @@ Add the `mail` attribute based on the user's `uid` attribute: $uid = $attributes["uid"][0]; $mail = $uid . "@example.net"; - $attributes["mail"] = array($mail); + $attributes["mail"] = [$mail]; ', - ), + ], Create a random number variable: - 10 => array( + 10 => [ 'class' => 'core:PHP', 'code' => ' - $attributes["random"] = array( + $attributes["random"] = [ (string)rand(), - ); + ]; ', - ), + ], Force a specific NameIdFormat. Useful if an SP misbehaves and requests (or publishes) an incorrect NameId - 90 => array( + 90 => [ 'class' => 'core:PHP', 'code' => '$state["saml:NameIDFormat"] = ["Format" => "urn:oasis:names:tc:SAML:2.0:nameid-format:transient", "AllowCreate" => true];' - ), + ], diff --git a/modules/core/docs/authproc_scopeattribute.md b/modules/core/docs/authproc_scopeattribute.md index 586158798667d2ddc234c195da27e1b7e35b6247..c495044e2c1cf06872d92182acdee03d760b987c 100644 --- a/modules/core/docs/authproc_scopeattribute.md +++ b/modules/core/docs/authproc_scopeattribute.md @@ -38,12 +38,12 @@ Example Add eduPersonScopedAffiliation based on eduPersonAffiliation and eduPersonPrincipalName. - 10 => array( + 10 => [ 'class' => 'core:ScopeAttribute', 'scopeAttribute' => 'eduPersonPrincipalName', 'sourceAttribute' => 'eduPersonAffiliation', 'targetAttribute' => 'eduPersonScopedAffiliation', - ), + ], With values being `eduPersonPrincipalName`: `jdoe@example.edu` and `eduPersonAffiliation`: `faculty`, this will result in the attribute diff --git a/modules/core/docs/authproc_scopefromattribute.md b/modules/core/docs/authproc_scopefromattribute.md index 5eba851b9f8702fbbb322bf6c28ee48d0bbf895b..f768bc0b318123e795c019882dd21a631d9a8eae 100644 --- a/modules/core/docs/authproc_scopefromattribute.md +++ b/modules/core/docs/authproc_scopefromattribute.md @@ -22,10 +22,10 @@ Example Set the `scope` attribute to the scope from the `eduPersonPrincipalName` attribute: - 'authproc' => array( - 50 => array( + 'authproc' => [ + 50 => [ 'class' => 'core:ScopeFromAttribute', 'sourceAttribute' => 'eduPersonPrincipalName', 'targetAttribute' => 'scope', - ), - ), + ], + ], diff --git a/modules/core/docs/authproc_statisticswithattribute.md b/modules/core/docs/authproc_statisticswithattribute.md index 4607c059ea5da12c6324c6130e7396aa10d34a27..22baa0420666caa8b5f4f6dc0a56fc18931d24e3 100644 --- a/modules/core/docs/authproc_statisticswithattribute.md +++ b/modules/core/docs/authproc_statisticswithattribute.md @@ -13,7 +13,7 @@ Parameters : The type of the statistics entry. `skipPassive` -: A boolean indicating whether passive requests should be skipped. Defaults to `FALSE`, in which case the type tag is prefixed with 'passive-'. +: A boolean indicating whether passive requests should be skipped. Defaults to `false`, in which case the type tag is prefixed with 'passive-'. Example @@ -21,9 +21,9 @@ Example Log the realm of the user: - 45 => array( + 45 => [ 'class' => 'core:StatisticsWithAttribute', 'attributename' => 'realm', 'type' => 'saml20-idp-SSO', - ), + ], diff --git a/modules/core/docs/authproc_targetedid.md b/modules/core/docs/authproc_targetedid.md index 75635d47cdab8c20dd194b6f3539a1161199f5c0..a73fbd4a4c99a7bdd66dbaf20f807f46459016a2 100644 --- a/modules/core/docs/authproc_targetedid.md +++ b/modules/core/docs/authproc_targetedid.md @@ -14,9 +14,9 @@ Parameters Note: only the first value of the specified attribute is being used for the generation of the identifier. `nameId` -: Set this option to `TRUE` to generate the attribute as in SAML 2 NameID format. +: Set this option to `true` to generate the attribute as in SAML 2 NameID format. This can be used to generate an Internet2 compatible `eduPersonTargetedID` attribute. - Optional, defaults to `FALSE`. + Optional, defaults to `false`. Examples @@ -24,32 +24,32 @@ Examples A custom attribute: - 'authproc' => array( - 50 => array( + 'authproc' => [ + 50 => [ 'class' => 'core:TargetedID', 'attributename' => 'eduPersonPrincipalName' - ), - ), + ], + ], Internet2 compatible `eduPersontargetedID`: /* In saml20-idp-hosted.php. */ - $metadata['__DYNAMIC:1__'] = array( + $metadata['__DYNAMIC:1__'] = [ 'host' => '__DEFAULT__', 'auth' => 'example-static', - 'authproc' => array( - 60 => array( + 'authproc' => [ + 60 => [ 'class' => 'core:TargetedID', - 'nameId' => TRUE, - ), - 90 => array( + 'nameId' => true, + ], + 90 => [ 'class' => 'core:AttributeMap', 'name2oid', - ), - ), + ], + ], 'attributes.NameFormat' => 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri', - 'attributeencodings' => array( + 'attributeencodings' => [ 'urn:oid:1.3.6.1.4.1.5923.1.1.1.10' => 'raw', /* eduPersonTargetedID with oid NameFormat. */ - ), - ); + ], + ]; diff --git a/modules/core/docs/authproc_warnshortssointerval.md b/modules/core/docs/authproc_warnshortssointerval.md index 73f24a2bb6fe8eb7889d33eedf0bcc5e89297a21..3ab8cf6ff926ddabff9379bfdcb446d9d00c150b 100644 --- a/modules/core/docs/authproc_warnshortssointerval.md +++ b/modules/core/docs/authproc_warnshortssointerval.md @@ -8,9 +8,9 @@ This is mainly intended to prevent redirect loops between the IdP and the SP. Example ------- - 'authproc' => array( - 50 => array( + 'authproc' => [ + 50 => [ 'class' => 'core:WarnShortSSOInterval', - ), - ), + ], + ], diff --git a/modules/core/lib/Controller/Login.php b/modules/core/lib/Controller/Login.php index 5e2dcca87d8b2ecde8ca2c3161a386578e0f31e7..8d08cf91b201e968971a3dc1ef19fbd84db01a90 100644 --- a/modules/core/lib/Controller/Login.php +++ b/modules/core/lib/Controller/Login.php @@ -186,10 +186,10 @@ class Login // we're not logged in, start auth $url = Module::getModuleURL('core/login/' . $as); - $params = array( + $params = [ 'ErrorURL' => $url, 'ReturnTo' => $url, - ); + ]; return new RunnableResponse([$auth, 'login'], [$params]); } diff --git a/modules/exampleauth/lib/Auth/Source/External.php b/modules/exampleauth/lib/Auth/Source/External.php index 44595129d149143d66cb4850d82aa7baf79bac52..7ce4d78a6f0c0ff59bf39032397dddf9fc63d17d 100644 --- a/modules/exampleauth/lib/Auth/Source/External.php +++ b/modules/exampleauth/lib/Auth/Source/External.php @@ -24,9 +24,9 @@ use SimpleSAML\Utils; * 4. Replace all occurrences of "exampleauth" in this file and in resume.php with the name of your module. * 5. Adapt the getUser()-function, the authenticate()-function and the logout()-function to your site. * 6. Add an entry in config/authsources.php referencing your module. E.g.: - * 'myauth' => array( + * 'myauth' => [ * '<mymodule>:External', - * ), + * ], * * @package SimpleSAMLphp */ diff --git a/modules/saml/lib/Auth/Process/ExpectedAuthnContextClassRef.php b/modules/saml/lib/Auth/Process/ExpectedAuthnContextClassRef.php index bc9fdef1b1da061a5132913945308ecb799fd210..2ffd641a6695540280fa9b5c842a93311d743f61 100644 --- a/modules/saml/lib/Auth/Process/ExpectedAuthnContextClassRef.php +++ b/modules/saml/lib/Auth/Process/ExpectedAuthnContextClassRef.php @@ -17,13 +17,13 @@ use SimpleSAML\Utils; * * Example configuration: * - * 91 => array( + * 91 => [ * 'class' => 'saml:ExpectedAuthnContextClassRef', - * 'accepted' => array( + * 'accepted' => [ * 'urn:oasis:names:tc:SAML:2.0:post:ac:classes:nist-800-63:3', * 'urn:oasis:names:tc:SAML:2.0:ac:classes:Password', - * ), - * ), + * ], + * ], * * @package SimpleSAMLphp */