19 package org.turro.auth;
21 import java.io.IOException;
22 import org.turro.string.Strings;
23 import org.turro.elephant.TemplateControl;
24 import org.turro.elephant.context.Application;
25 import org.turro.elephant.web.ElContext;
26 import org.turro.elephant.zkoss.ZkossElephant;
27 import org.turro.i18n.I_;
28 import org.turro.plugin.contacts.IContact;
29 import org.turro.sso.SSO;
30 import org.turro.util.PasswordStrength;
31 import org.zkoss.zk.ui.Executions;
32 import org.zkoss.zk.ui.event.InputEvent;
33 import org.zkoss.zk.ui.select.annotation.Listen;
34 import org.zkoss.zk.ui.select.annotation.Wire;
35 import org.zkoss.zk.ui.util.Clients;
36 import org.zkoss.zul.Progressmeter;
37 import org.zkoss.zul.Textbox;
48 private Textbox password;
51 private Textbox repeatpass;
54 private Progressmeter strength;
56 @Listen(
"onChanging = #password")
58 strength.setValue(PasswordStrength.checkStrength(evt.getValue()));
61 @Listen(
"onClick = #change")
63 if(!Strings.isBlank(password.getValue()) && password.getValue().equals(repeatpass.getValue())) {
65 contact.
setPassword(password.getText(), repeatpass.getText());
72 Clients.showNotification(
I_.
get(
"Values had to be equal"));
78 redir = Executions.getCurrent().getParameter(
"redir");
79 if(Strings.isBlank(redir)) {
static IContact getIContact()
void onChangingPassword(InputEvent evt)
static String getCookieValue(String name)
abstract void sendRedirect(String uri)
static void encryptCookie(String name, String value, String path, int age)
static Application getApplication()
abstract HttpServletRequest getHttpServletRequest()
static String extractPath(String path)
static Application getCurrent()
static String get(String msg)