{"id":15952421,"url":"https://github.com/try0/wicket-honeypot","last_synced_at":"2025-10-28T16:40:34.459Z","repository":{"id":246746955,"uuid":"822005788","full_name":"try0/wicket-honeypot","owner":"try0","description":"Adds honeypot field to the form.","archived":false,"fork":false,"pushed_at":"2024-07-06T15:37:46.000Z","size":176,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"wicket-10","last_synced_at":"2025-08-30T09:34:30.088Z","etag":null,"topics":["form-validation","honeypot","security","wicket"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/try0.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":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-30T03:36:35.000Z","updated_at":"2025-01-16T10:37:58.000Z","dependencies_parsed_at":"2024-07-06T04:49:16.311Z","dependency_job_id":"b3f87ce9-57e0-480a-a780-d6b2098b7c16","html_url":"https://github.com/try0/wicket-honeypot","commit_stats":null,"previous_names":["try0/wicket-honeypot"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/try0/wicket-honeypot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/try0%2Fwicket-honeypot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/try0%2Fwicket-honeypot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/try0%2Fwicket-honeypot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/try0%2Fwicket-honeypot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/try0","download_url":"https://codeload.github.com/try0/wicket-honeypot/tar.gz/refs/heads/wicket-10","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/try0%2Fwicket-honeypot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281476025,"owners_count":26508132,"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","status":"online","status_checked_at":"2025-10-28T02:00:06.022Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["form-validation","honeypot","security","wicket"],"created_at":"2024-10-07T13:08:35.386Z","updated_at":"2025-10-28T16:40:34.437Z","avatar_url":"https://github.com/try0.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wicket-honeypot\nAdds honeypot field to the form.\n\n## Version\n\n\n| Version | Wicket |\n| ---- | ---- |\n| [3.0.0](https://search.maven.org/artifact/jp.try0.wicket/wicket-honeypot-core/3.0.0/jar) | 10.x |\n| [2.0.0](https://search.maven.org/artifact/jp.try0.wicket/wicket-honeypot-core/2.0.0/jar) | 9.x |\n| [1.0.0](https://search.maven.org/artifact/jp.try0.wicket/wicket-honeypot-core/1.0.0/jar)  | 8.x |\n\nWicket 10.x\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ejp.try0.wicket\u003c/groupId\u003e\n    \u003cartifactId\u003ewicket-honeypot-core\u003c/artifactId\u003e\n    \u003cversion\u003e3.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nWicket 9.x\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ejp.try0.wicket\u003c/groupId\u003e\n    \u003cartifactId\u003ewicket-honeypot-core\u003c/artifactId\u003e\n    \u003cversion\u003e2.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nWicket 8.x\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ejp.try0.wicket\u003c/groupId\u003e\n    \u003cartifactId\u003ewicket-honeypot-core\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n\n## Usage\n\n```java\nadd(new Form\u003cVoid\u003e(\"form\") {\n    {\n        add(new HoneypotBehavior());\n    }\n});\n```\n\n\nHoneypotBehavior uses JavaScript on the client side to add a honeypot field to the form. The added field is of type text and will be hidden using styles.\n\n```html\n\u003cinput \n    type=\"text\" \n    id=\"hpb-id-0\" \n    name=\"hpb-id\" \n    class=\"hpb-f\" \n    aria-hidden=\"true\" \n    tabindex=\"-1\" \n    autocomplete=\"one-time-code\" \n    style=\"visibility: hidden; position: fixed; z-index: 0; bottom: 0px; left: 0px; width: 0px; margin: 0px 0px 0px -10em;\"\u003e\n```\n\n\nThe field addition process can be executed with a delay.\nFor example, this code determines that requests made within two seconds of the screen being displayed are bot actions.\n\n```java\nadd(new Form\u003cVoid\u003e(\"form\") {\n    {\n        int delayMs = 2000;\n        add(new HoneypotBehavior(delayMs));\n    }\n});\n```\n\n\nTo display a message and request form resubmission when a user action is mistakenly identified as a bot action, please override the onError method.\n\n```java\nadd(new Form\u003cVoid\u003e(\"form\") {\n    {\n        int delayMs = 2000;\n        add(new HoneypotBehavior(delayMs) {\n            @Override\n            protected void onError(Form\u003c?\u003e form) {\n                form.error(HomePage.this.getString(\"honeypot_error_message\")); // TODO your prop key\n            }\n        });\n    }\n});\n```\n\n\n\n\n\nWith other configs.\n\n```java\nadd(new Form\u003cVoid\u003e(\"form\") {\n    {\n        // custom config\n        HoneypotBehaviorConfig config = new HoneypotBehaviorConfig();\n        // the field addition process can be executed with a delay.\n        // default: 0\n        config.setDelay(1500);\n        // honeypot field autocomplete attr.\n        // default: one-time-code\n        config.setAutocomplete(\"one-time-code\");\n        // block submit on the client.\n        // default: false\n        config.setBlockSubmit(true);\n        // If none of [keydown, mousemove, touchstart, touchmove, scroll] events are detected, assume the user is a bot.\n        // default: false\n        config.setDetectHumanActivity(true);\n\n        add(new HoneypotBehavior(config));\n    }\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftry0%2Fwicket-honeypot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftry0%2Fwicket-honeypot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftry0%2Fwicket-honeypot/lists"}