https://github.com/manolo/gwt-captcha
A Captcha widget for GWT which not depends on server side
https://github.com/manolo/gwt-captcha
Last synced: 4 months ago
JSON representation
A Captcha widget for GWT which not depends on server side
- Host: GitHub
- URL: https://github.com/manolo/gwt-captcha
- Owner: manolo
- License: mit
- Created: 2013-12-05T13:32:58.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-12-05T13:42:30.000Z (over 11 years ago)
- Last Synced: 2024-12-31T19:45:00.510Z (5 months ago)
- Language: Java
- Size: 145 KB
- Stars: 4
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.txt
- License: LICENSE
Awesome Lists containing this project
README
This is a captcha widget for GWT which not depends on server side.
Since it is code run in the client side it could have security issues,
but the agressive obfuscation of GWT makes the javascript code difficult
to hack.When validation is failed captcha is recomputed so as we protect against
brute force.The captcha image is shown in a canvas, so it is available in most browsers
but ie6-8.This widget depends on the gwtQuery library.
Example code:
HorizontalPanel panel = new HorizontalPanel();
RootPanel.get().add(panel);
final Captcha captcha = new Captcha("mycaptcha");
Button button = new Button("Validate");
panel.add(captcha);
panel.add(button);
button.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
Window.alert(captcha.validate() ? "Valid captcha" : "Invalid captcha, try again");
}
});