{"id":20163445,"url":"https://github.com/sjinks/yubico-otp","last_synced_at":"2025-04-10T00:41:02.725Z","repository":{"id":57080755,"uuid":"159315847","full_name":"sjinks/yubico-otp","owner":"sjinks","description":"PHP 7/8-friendly alternative to the official php-yubico client","archived":false,"fork":false,"pushed_at":"2025-03-03T07:07:01.000Z","size":205,"stargazers_count":5,"open_issues_count":3,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-05T05:02:23.663Z","etag":null,"topics":["2fa","authentication","otp","php","security","yubico","yubico-otp"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sjinks.png","metadata":{"funding":{"custom":["https://www.paypal.com/donate/?hosted_button_id=SAG6877JDJ3KU","https://send.monobank.ua/jar/7rosVfiwKM"]},"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":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-27T10:13:38.000Z","updated_at":"2025-03-03T07:06:40.000Z","dependencies_parsed_at":"2024-04-08T04:31:35.964Z","dependency_job_id":"c9f25518-182a-45a6-9777-a8b376418b0f","html_url":"https://github.com/sjinks/yubico-otp","commit_stats":{"total_commits":21,"total_committers":2,"mean_commits":10.5,"dds":0.09523809523809523,"last_synced_commit":"f0dff9d2d7ac9b9795a5ee0687ce675b69b0bb03"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjinks%2Fyubico-otp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjinks%2Fyubico-otp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjinks%2Fyubico-otp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjinks%2Fyubico-otp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sjinks","download_url":"https://codeload.github.com/sjinks/yubico-otp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248137997,"owners_count":21053775,"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":["2fa","authentication","otp","php","security","yubico","yubico-otp"],"created_at":"2024-11-14T00:29:38.590Z","updated_at":"2025-04-10T00:41:02.706Z","avatar_url":"https://github.com/sjinks.png","language":"PHP","funding_links":["https://www.paypal.com/donate/?hosted_button_id=SAG6877JDJ3KU","https://send.monobank.ua/jar/7rosVfiwKM"],"categories":[],"sub_categories":[],"readme":"# yubico-otp\n\n[![CI](https://github.com/sjinks/yubico-otp/actions/workflows/ci.yaml/badge.svg)](https://github.com/sjinks/yubico-otp/actions/workflows/ci.yaml)\n[![Static Code Analysis](https://github.com/sjinks/yubico-otp/actions/workflows/static-code-analysis.yml/badge.svg)](https://github.com/sjinks/yubico-otp/actions/workflows/static-code-analysis.yml)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=sjinks_yubico-otp\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=sjinks_yubico-otp)\n\nPHP 7/8-friendly alternative to the official [php-yubico](https://github.com/Yubico/php-yubico) client.\n\n## Installation\n\n```bash\ncomposer require wildwolf/yubico-otp\n```\n\n## Usage\n\n```php\n$otp      = new WildWolf\\Yubico\\OTP($id, $secret);\n$response = null;\n$result   = $otp-\u003everify($code, null, \u0026$response);\n```\n\nWhere:\n  * `$id`, `$secret` are the Client ID and the secret key; you will need to [sign up](https://upgrade.yubico.com/getapikey/) for them;\n  * `$code` is the OTP code to verify (it will look something like `ccccccjknjjnfffttntuknrfnkednknkfjegcrhhkuut`; see `OTP::parsePasswordOTP()` for its format);\n  * `$result` is the verification result (`true` for success, `false` for failure);\n  * `$response` is the raw response from Yubico ([details](https://developers.yubico.com/OTP/Specifications/OTP_validation_protocol.html)).\n\n`verify()` can throw `OTPBadResponseException` if the response fails the basic sanity checks, `OTPTamperedResponseException` if the response signature fails to validate, `OTPTransportException` in case of the issues talking to the OTP server.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsjinks%2Fyubico-otp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsjinks%2Fyubico-otp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsjinks%2Fyubico-otp/lists"}