- Spell Checker
This guide describes how to save, update, and manage passwords the user enters in a new form online.
Chromium has a built-in functionality that allows remembering the entered credentials when the user submits a new form containing username and password. The library will ask you if you’d like to save the credentials.
If you save them, the next time you load the form, the library will suggest autofill it.
The web form autofill functionality must be enabled in this case.
To access and manage all saved passwords, use
PasswordStore you can access using:
PasswordStore passwordStore = profile.passwordStore();
When the user submits a new form containing username and password, the library will ask you if you’d like to save the credentials via
SavePasswordCallback. In the callback you will be prompted to save or “never-save” (blacklist) the password. For example:
browser.set(SavePasswordCallback.class, (params, tell) -> tell.save());
If you choose to save the password, it will be added to the password store. If select “never-save”, you will mark the forms at this URL as blacklisted. The library will never suggest you to save the passwords on this web page anymore.
When the user submits the previously submitted form with a new password, the library will ask you to update the saved credentials via
UpdatePasswordCallback. In this callback you will be prompted to update or ignore the new value. For example:
browser.set(UpdatePasswordCallback.class, (params, tell) -> tell.update());
To read all saved and blacklisted records use:
List<PasswordRecord> allRecords = passwordStore.all();
To read only saved records use:
List<PasswordRecord> allSavedRecords = passwordStore.allSaved();
To read only “never-saved” (marked as blacklisted) records use:
List<PasswordRecord> allNeverSavedRecords = passwordStore.allNeverSaved();
To remove all records from the store use:
To remove records associated with a specific URL use: