Search in sources :

Example 1 with PasswordService

use of org.apache.shiro.authc.credential.PasswordService in project ART-TIME by Artezio.

the class SettingsService method update.

@FacesMessage(onCompleteMessageKey = "message.settingsAreSaved")
public Settings update(Settings settings, String password) {
    PasswordService passwordService = new DefaultPasswordService();
    String encryptedPassword = passwordService.encryptPassword(password);
    settings.setAdminPassword(encryptedPassword);
    return update(settings);
}
Also used : DefaultPasswordService(org.apache.shiro.authc.credential.DefaultPasswordService) PasswordService(org.apache.shiro.authc.credential.PasswordService) DefaultPasswordService(org.apache.shiro.authc.credential.DefaultPasswordService) FacesMessage(com.artezio.arttime.web.interceptors.FacesMessage)

Aggregations

FacesMessage (com.artezio.arttime.web.interceptors.FacesMessage)1 DefaultPasswordService (org.apache.shiro.authc.credential.DefaultPasswordService)1 PasswordService (org.apache.shiro.authc.credential.PasswordService)1