https://github.com/vaadin-component-factory/password-strength
Visualisation of password's strength, represented by 5 block that changes colour
https://github.com/vaadin-component-factory/password-strength
Last synced: 3 months ago
JSON representation
Visualisation of password's strength, represented by 5 block that changes colour
- Host: GitHub
- URL: https://github.com/vaadin-component-factory/password-strength
- Owner: vaadin-component-factory
- License: apache-2.0
- Created: 2019-04-26T07:17:17.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-08-30T16:26:21.000Z (over 3 years ago)
- Last Synced: 2025-01-10T00:36:33.555Z (4 months ago)
- Language: Java
- Size: 44.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Component Factory Password Strength for Vaadin 10+
Password Strength is server-side component of [<vcf-password-strength>](https://github.com/vaadin-component-factory/vcf-password-strength) web component for Vaadin 10.
It provides a strength indicator for a password field.[Live Demo ↗](https://incubator.app.fi/password-strength-demo/password-strength)
[
](https://vaadin.com/directory/component/vaadin-component-factoryvcf-password-strength)
## Usage
Strength can be set from 0 to 5. Strength represent number of blocks that would be filled with color and color of fill
ling(0 - nothing, 1 - red, 2 - orange, 3 - yellow, 4 - light green, 5 - dark green). Setting strength to more then 5 will make no difference from just setting it to 5.```
PasswordStrength passwordStrength = new PasswordStrength();
passwordStrength.setStrength(4);
```
Setting strength to 4 mean will indicate good password strength.Common use case would be to track changes of PasswordField and then calculating and setting strength on every change:
```
passwordField.addValueChangeListener(changeEvent -> {
passwordStrength.setStrength(changeEvent.getValue().length() / 3);
});
```## Setting up for development:
Clone the project in GitHub (or fork it if you plan on contributing)
```
https://github.com/vaadin/password-strength
```To build and install the project into the local repository run
```mvn install ```
## Demo
To run demo go to `password-strength-demo/` subfolder and run `mvn jetty:run`.
After server startup, you'll be able find demo at [http://localhost:8080/password-strength](http://localhost:8080/password-strength)## License & Author
This Add-on is distributed under Apache 2.0
Component Factory Password Strength is written by Vaadin Ltd.
### Sponsored development
Major pieces of development of this add-on has been sponsored by multiple customers of Vaadin. Read more about Expert on Demand at: [Support](https://vaadin.com/support) and [Pricing](https://vaadin.com/pricing)