-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #845 from catalyst/support_moodle_4.5
Support for Moodle 404+
- Loading branch information
Showing
3,929 changed files
with
668,343 additions
and
198,758 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,38 +8,28 @@ SimpleSAMLphp | |
We need to manually build simplesaml sometimes as the release contains dependencies we don't want. | ||
|
||
### Get upstream simplesaml. | ||
Make sure to checkout the latest version tag | ||
```bash | ||
git clone [email protected]:simplesamlphp/simplesamlphp.git simplesamlphp | ||
|
||
cd /var/simplesamlphp | ||
cp -r config-templates/* config/ | ||
cp -r metadata-templates/* metadata/ | ||
cd simplesamlphp | ||
git checkout v2.3.3 | ||
``` | ||
### Install composer | ||
```bash | ||
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | ||
php -r "if (hash_file('sha384', 'composer-setup.php') === '756890a4488ce9024fc62c56153228907f1545c228516cbf63f885e036d37e9a59d27d63f46af1d4d07ee0f76181c7d3') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" | ||
php composer-setup.php | ||
php -r "unlink('composer-setup.php');" | ||
``` | ||
### Remove any dependencies we don't want. | ||
Remove symfony/config/Tests/Fixtures as PHPLint fails due to unexpected end of file error in Fixtures/ParseError.php. | ||
In 1.17 build, we removed symfony/polyfill-php70 from composer.lock. | ||
[Composer Install Guide](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-macos) | ||
|
||
### Install the external dependencies (excluding dev) | ||
Make sure you run the install with "--no-dev" as below. | ||
Remove any depdnencies we don't want. | ||
```bash | ||
php composer.phar install --no-dev | ||
npm install | ||
npm run build | ||
composer install --no-dev | ||
composer remove phpmailer/phpmailer | ||
``` | ||
|
||
### Review simplesamlphp bin/build-release.sh | ||
Simplesamlphp uses a bin/build-release.sh to generate their release | ||
This script removes a number of system files that are not required like .gitignore, composer.* files, node_modules directory. | ||
|
||
Review the latest version of this file and remove anything not required: | ||
https://github.com/simplesamlphp/simplesamlphp/blob/master/bin/build-release.sh | ||
### Clean Files | ||
See the cleaning step in the [workflow](https://github.com/simplesamlphp/simplesamlphp/blob/master/.github/workflows/build-release.yml), At the time of writing this deletes everything referenced in `.gitattributes`. We also remove | ||
* `composer.json` | ||
* `composer.lock` | ||
* `modules/.gitignore` | ||
### Copy into auth_saml2 | ||
Copy the updated simplesaml files into auth/saml/.extlib/simplesaml. | ||
|
||
|
@@ -59,45 +49,6 @@ Update the version of SSP in the supported branches. Make sure you do this is AL | |
even if you have only updated SSP in one branch. It shouldn't matter which README you look at they | ||
should be consistent. | ||
|
||
# Using a published release | ||
Sometimes you might get away with using a published release with the following instructions. | ||
|
||
Do not copy & paste blindly, this is the general idea only. | ||
|
||
```bash | ||
cd auth/saml2/.extlib | ||
|
||
# We will delete stuff and compare later. | ||
# Ensure everything is commited into git. | ||
git checkout -b issueXXX_extlib-upgrade | ||
git status | ||
``` | ||
|
||
```bash | ||
rm -rf simplesamlphp | ||
|
||
curl -L https://simplesamlphp.org/download?latest | tar vxz | ||
mv simplesamlphp-1.15.4 simplesamlphp | ||
rm -rf simplesamlphp/config | ||
rm -rf simplesamlphp/metadata | ||
|
||
git add simplesamlphp | ||
git commit -m 'Issue #XXX - Updating with code from simplesamlphp-1.15.4' # Customise the message! | ||
|
||
# Check what was customised when this document was updated, you may want to cherry pick it. | ||
git show a32804374772709d65264ab823f8a3b3adfc6391 | ||
|
||
# Analyse what is different, backport modifications as needed. | ||
git diff master..HEAD | ||
|
||
# Analyse your changes, try to keep as close as possible to the upstream code. | ||
git diff HEAD | ||
|
||
# Done! | ||
git add simplesamlphp | ||
git commit -m 'Issue #XXX - Backporting modifications for auth_saml2' # Customise the message! | ||
``` | ||
|
||
# Testing locally | ||
1> Set up IDP locally as suggested here: https://simplesamlphp.org/docs/stable/simplesamlphp-idp | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
$attributemap = [ | ||
/** | ||
* Renamed Attributes to match other 2name mappings | ||
*/ | ||
"http://schemas.microsoft.com/identity/claims/objectidentifier" => 'uid', | ||
"http://schemas.microsoft.com/identity/claims/displayname" => 'displayName', | ||
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname" => 'givenName', | ||
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname" => 'sn', | ||
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress" => 'emailAddress', | ||
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name" => 'mail', | ||
|
||
/** | ||
* Additional/Optional Claim, using default value | ||
*/ | ||
"http://schemas.microsoft.com/ws/2008/06/identity/claims/groups" => 'groups', | ||
|
||
/** | ||
* Additional Attributes from Entra | ||
*/ | ||
"http://schemas.microsoft.com/claims/authnmethodsreferences" => 'authNMethodsReferences', | ||
"http://schemas.microsoft.com/identity/claims/identityprovider" => 'idp', | ||
"http://schemas.microsoft.com/identity/claims/tenantid" => 'tenantId', | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
$attributemap = [ | ||
/** | ||
* Renamed Attributes to match other 2name mappings, mapped back to default Entra claim names | ||
*/ | ||
'uid' => 'http://schemas.microsoft.com/identity/claims/objectidentifier', | ||
'displayName' => 'http://schemas.microsoft.com/identity/claims/displayname', | ||
'givenName' => 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname', | ||
'sn' => 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname', | ||
'emailAddress' => 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress', | ||
'mail' => 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name', | ||
|
||
/** | ||
* Additional/Optional Claim, using default value, mapped back to original claim names | ||
*/ | ||
'groups' => 'http://schemas.microsoft.com/ws/2008/06/identity/claims/groups', | ||
|
||
/** | ||
* Additional Attributes from Entra, mapped back to original claims | ||
*/ | ||
'authNMethodsReferences' => 'http://schemas.microsoft.com/claims/authnmethodsreferences', | ||
'idp' => 'http://schemas.microsoft.com/identity/claims/identityprovider', | ||
'tenantId' => 'http://schemas.microsoft.com/identity/claims/tenantid', | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.