{"id":19794131,"url":"https://github.com/simplesamlphp/simplesamlphp-module-casserver","last_synced_at":"2025-05-01T02:30:56.181Z","repository":{"id":29529721,"uuid":"33068335","full_name":"simplesamlphp/simplesamlphp-module-casserver","owner":"simplesamlphp","description":"CAS 1.0 and 2.0 compliant CAS server module for simpleSAMLphp","archived":false,"fork":false,"pushed_at":"2025-04-17T22:28:40.000Z","size":612,"stargazers_count":6,"open_issues_count":3,"forks_count":11,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-18T12:15:48.088Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simplesamlphp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-03-29T09:58:22.000Z","updated_at":"2025-04-17T22:28:44.000Z","dependencies_parsed_at":"2024-07-17T02:04:22.639Z","dependency_job_id":"0970d4ee-41e4-45b8-b503-d07f5397e269","html_url":"https://github.com/simplesamlphp/simplesamlphp-module-casserver","commit_stats":{"total_commits":417,"total_committers":8,"mean_commits":52.125,"dds":0.5755395683453237,"last_synced_commit":"c8b5bc5997a4ec63834c78c62d9f2a77a7c52d0e"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplesamlphp%2Fsimplesamlphp-module-casserver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplesamlphp%2Fsimplesamlphp-module-casserver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplesamlphp%2Fsimplesamlphp-module-casserver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplesamlphp%2Fsimplesamlphp-module-casserver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simplesamlphp","download_url":"https://codeload.github.com/simplesamlphp/simplesamlphp-module-casserver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251812305,"owners_count":21647884,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T07:12:10.933Z","updated_at":"2025-05-01T02:30:56.168Z","avatar_url":"https://github.com/simplesamlphp.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SimpleSAMLphp-casserver\n\n![Build Status](https://github.com/simplesamlphp/simplesamlphp-module-casserver/actions/workflows/php.yml/badge.svg)\n[![Coverage Status](https://codecov.io/gh/simplesamlphp/simplesamlphp-module-casserver/branch/master/graph/badge.svg)](https://codecov.io/gh/simplesamlphp/simplesamlphp-module-casserver)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/simplesamlphp/simplesamlphp-module-casserver/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/simplesamlphp/simplesamlphp-module-casserver/?branch=master)\n[![Type Coverage](https://shepherd.dev/github/simplesamlphp/simplesamlphp-module-casserver/coverage.svg)](https://shepherd.dev/github/simplesamlphp/simplesamlphp-module-casserver)\n[![Psalm Level](https://shepherd.dev/github/simplesamlphp/simplesamlphp-module-casserver/level.svg)](https://shepherd.dev/github/simplesamlphp/simplesamlphp-module-casserver)\n\nSimpleSAMLphp-casserver is a CAS 1.0 and 2.0 compliant CAS server in the form\nof a SimpleSAMLphp module.\n\n## Install\n\nInstall with composer\n\n```bash\ncomposer require simplesamlphp/simplesamlphp-module-casserver\n```\n\n## Configuration\n\nNext thing you need to do is to enable the module: in `config.php`,\nsearch for the `module.enable` key and set `casserver` to true:\n\n```php\n'module.enable' =\u003e [\n    'casserver' =\u003e true,\n    …\n],\n```\n\nSee the `config-templates` folder for examples of configuring this module\n\n## Debug\n\nTo aid in debugging you can print out the CAS ticket xml rather then returning\na ticket id. Enable `debugMode` in `module_casserver.php` and then add a query\nparameter `debugMode=true` to the CAS login url.\n\nLogging in to\n`https://cas.example.com/cas/login?debugMode=true\u0026service=http://localhost/`\nwould now print the xml for that service.\n\n```xml\n\u003c?xml version=\"1.0\"\u003e\n\u003ccas:serviceResponse xmlns:cas=\"http://www.yale.edu/tp/cas\"\u003e\n \u003ccas:authenticationSuccess\u003e\n  \u003ccas:user\u003etestuser@example.com\u003c/cas:user\u003e\n  \u003ccas:attributes\u003e\n   \u003ccas:eduPersonPrincipalName\u003etestuser@example.com\u003c/cas:eduPersonPrincipalName\u003e\n   \u003ccas:base64Attributes\u003efalse\u003c/cas:base64Attributes\u003e\n  \u003c/cas:attributes\u003e\n \u003c/cas:authenticationSuccess\u003e\n\u003c/cas:serviceResponse\u003e\n```\n\n## Development\n\nRun `phpcs` to check code style\n\n```shell\nphpcs --standard=PSR12 lib/ tests/ www/ templates/\n```\n\nRun `phpunit` to test\n\n```shell\n./vendor/bin/phpunit\n```\n\nUse docker php image to easily test between versions\n\n```shell\ndocker run -ti --rm -v \"$PWD\":/usr/src/myapp -w /usr/src/myapp php:7.1-cli ./vendor/bin/phpunit\n```\n\nYou can auto correct some findings from phpcs. It is recommended you do this\nafter stage your changes (or maybe even commit) since there is a non-trivial\nchance it will just mess up your code.\n\n```shell\nphpcbf --ignore=somefile.php --standard=PSR12 lib/ tests/ www/ templates/\n```\n\n### Local testing with docker\n\nTo explore the module using docker run the below command. This will run an SSP image, with the current git checkout\nof the `casserver` module mounted in the container, along with some configuration files. Any code changes you make to your git checkout are\n\"live\" in the container, allowing you to test and iterate different things.\n\nSometimes when working with a dev version of the module you will need a newer version of a dependency than what SSP is\nlocked to. In that case you can add an additional dependency to the `COMPOSER_REQUIRE` line (e.g =\"simplesamlphp/assert:1.8 \")\n\n```bash\ndocker run --name ssp-casserver-dev \\\n   --mount type=bind,source=\"$(pwd)\",target=/var/simplesamlphp/staging-modules/casserver,readonly \\\n  -e STAGINGCOMPOSERREPOS=casserver \\\n  -e COMPOSER_REQUIRE=\"simplesamlphp/simplesamlphp-module-casserver:@dev simplesamlphp/simplesamlphp-module-preprodwarning\" \\\n  -e SSP_ADMIN_PASSWORD=secret1 \\\n  --mount type=bind,source=\"$(pwd)/docker/ssp/module_casserver.php\",target=/var/simplesamlphp/config/module_casserver.php,readonly \\\n  --mount type=bind,source=\"$(pwd)/docker/ssp/authsources.php\",target=/var/simplesamlphp/config/authsources.php,readonly \\\n  --mount type=bind,source=\"$(pwd)/docker/ssp/config-override.php\",target=/var/simplesamlphp/config/config-override.php,readonly \\\n  --mount type=bind,source=\"$(pwd)/docker/apache-override.cf\",target=/etc/apache2/sites-enabled/ssp-override.cf,readonly \\\n   -p 443:443 cirrusid/simplesamlphp:v2.3.5\n```\n\nVisit [https://localhost/simplesaml/](https://localhost/simplesaml/) and confirm you get the default page.\nThen navigate to [casserver debug](https://localhost/cas/login?service=http://host1.domain:1234/path1\u0026debugMode=true), authenticate and confirm\nuse see what a ticket would look like. To see what a CAS v1 saml response looks like set [debugMode=samlValidate](https://localhost/cas/login?service=http://host1.domain:1234/path1\u0026debugMode=samlValidate)\n\n## History\n\nCAS 1.0 and 2.0 compliant CAS server module for simpleSAMLphp\n\nThis is the simpleSAMLphp CAS server module developed at the State and\nUniversity Library in Aarhus Denmark. The module is a fork of an old version\nof the CAS module shipped with simpleSAMLphp which has undergone a couple of\niterations of refactoring, bugfixes and enhancements.\nFor details see the ChangeLog in the doc directory.\n\nAll files are rewritten based on work by Dubravko Voncina.\nSee Google Groups discussion in [this thread][1].\n\n[1]: http://groups.google.com/group/simplesamlphp/browse_thread/thread/4c655d169532650a\n\n### License\n\nThis work is licensed under a Creative Commons GNU Lesser General Public\nLicense License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplesamlphp%2Fsimplesamlphp-module-casserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimplesamlphp%2Fsimplesamlphp-module-casserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplesamlphp%2Fsimplesamlphp-module-casserver/lists"}