{"id":19411604,"url":"https://github.com/duosecurity/duo_universal_php","last_synced_at":"2025-04-10T00:16:16.558Z","repository":{"id":53169780,"uuid":"345717335","full_name":"duosecurity/duo_universal_php","owner":"duosecurity","description":"Duo OIDC-based two-factor authentication for PHP web applications","archived":false,"fork":false,"pushed_at":"2025-03-05T18:38:17.000Z","size":88,"stargazers_count":25,"open_issues_count":2,"forks_count":15,"subscribers_count":29,"default_branch":"main","last_synced_at":"2025-04-10T00:16:13.359Z","etag":null,"topics":["duo","mfa","php"],"latest_commit_sha":null,"homepage":"https://duo.com/docs/duoweb","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/duosecurity.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-08T16:18:19.000Z","updated_at":"2025-03-13T12:35:15.000Z","dependencies_parsed_at":"2024-01-09T16:52:08.635Z","dependency_job_id":"33705dd7-310a-4017-b237-adc955f20614","html_url":"https://github.com/duosecurity/duo_universal_php","commit_stats":{"total_commits":39,"total_committers":7,"mean_commits":5.571428571428571,"dds":0.6666666666666667,"last_synced_commit":"9fed046b38246330aa4cf3a51698a69f76f150bd"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duosecurity%2Fduo_universal_php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duosecurity%2Fduo_universal_php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duosecurity%2Fduo_universal_php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duosecurity%2Fduo_universal_php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/duosecurity","download_url":"https://codeload.github.com/duosecurity/duo_universal_php/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248131315,"owners_count":21052819,"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":["duo","mfa","php"],"created_at":"2024-11-10T12:22:15.397Z","updated_at":"2025-04-10T00:16:16.539Z","avatar_url":"https://github.com/duosecurity.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Duo Universal PHP library\n\n[![Build Status](https://github.com/duosecurity/duo_universal_php/workflows/PHP%20CI/badge.svg)](https://github.com/duosecurity/duo_universal_php/actions)\n\nThis SDK allows a web developer to quickly add Duo's interactive, self-service, two-factor authentication to any PHP web login form.\n\n\nWhat's included:\n* `src` - The PHP Duo SDK for interacting with the Duo Universal Prompt\n* `example` - An example PHP application with Duo integrated\n* `tests` - Test cases\n\n## Getting started\nThis library requires PHP 7.4 or later\n\nTo use SDK in your existing developing environment, install it from Packagist\n```\ncomposer require duosecurity/duo_universal_php\n```\nOnce it's installed, see our developer documentation at https://duo.com/docs/duoweb and `sample/index.php` in this repo for guidance on integrating Duo 2FA into your web application.\n\n### TLS 1.2 and 1.3 Support\n\nDuo_universal_php uses PHP's cURL extension and OpenSSL for TLS operations.  TLS support will depend on the versions of multiple libraries:\n\nTLS 1.2 support requires PHP 5.5 or higher, curl 7.34.0 or higher, and OpenSSL 1.0.1 or higher.\n\nTLS 1.3 support requires PHP 7.3 or higher, curl 7.61.0 or higher, and OpenSSL 1.1.1 or higher.\n\n\n## Contribute\nTo contribute, fork this repo and make a pull request with your changes when they are ready.\n\nInstall the SDK from source:\n```\ncomposer install\n```\n\nRun interactive mode\n```\nphp -a -d auto_prepend_file=vendor/autoload.php\n\nInteractive shell\n\nphp \u003e $client = new Duo\\DuoUniversal\\Client(\"IntegrationKey\", \"SecretKey\", \"api-XXXXXXXX.duosecurity.com\", \"https://example.com\");\nphp \u003e $state = $client-\u003egenerateState();\nphp \u003e $username = \"example\";\nstring(700) \"https://api-XXXXXXXX.duosecurity.com/oauth/v1/authorize?response_type=code\u0026client_id=DIXXXXXXXXXXXXXXXXXX\u0026scope=openid\u0026redirect_uri=https%3A%2F%2Fexample.com\u0026request=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzY29wZSI6Im9wZW5pZCIsInJlZGlyZWN0X3VyaSI6Imh0dHBzOlwvXC9leGFtcGxlLmNvbSIsImNsaWVudF9pZCI6IkRJWFhYWFhYWFhYWFhYWFhYWFhYIiwiaXNzIjoiRElYWFhYWFhYWFhYWFhYWFhYWFgiLCJhdWQiOiJodHRwczpcL1wvYXBpLVhYWFhYWFhYLmR1b3NlY3VyaXR5LmNvbSIsImV4cCI6MTYxMjI5OTA3Nywic3RhdGUiOiJtYjlWalFGeDNzMEswRVpidVBJMmlCVWE4N29qbWFMTUl2VksiLCJyZXNwb25zZV90eXBlIjoiY29kZSIsImR1b191bmFtZSI6ImV4YW1wbGUiLCJ1c2VfZHVvX2NvZGVfYXR0cmlidXRlIjp0cnVlfQ.8Pr02LJd0pi6rsiAf5mvzGbf51piHysHyP5PlmnMiwNIkQ0HsYED0wECilXxsIyISz--oU528Cy7Sfebj0copg\"\n```\n\n## Tests\n```\n./vendor/bin/phpunit --process-isolation tests\n```\n\n## Lint\nTo run linter\n```\n./vendor/bin/phpcs --standard=.duo_linting.xml -n src/* tests\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduosecurity%2Fduo_universal_php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fduosecurity%2Fduo_universal_php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduosecurity%2Fduo_universal_php/lists"}