mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 11:39:11 +03:00
[FEATURE] email при регистрации
This commit is contained in:
parent
49e26d0d29
commit
d9c4cfdbc8
2 changed files with 3 additions and 0 deletions
|
@ -36,6 +36,7 @@ public class User {
|
||||||
private byte[] password;
|
private byte[] password;
|
||||||
private String accessToken;
|
private String accessToken;
|
||||||
public String serverID;
|
public String serverID;
|
||||||
|
public String email;
|
||||||
private String password_salt;
|
private String password_salt;
|
||||||
public long permissions;
|
public long permissions;
|
||||||
//TODO: заменить EAGER на LASY и придумать способ сохранить сессию
|
//TODO: заменить EAGER на LASY и придумать способ сохранить сессию
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
public class RegisterResponse extends SimpleResponse {
|
public class RegisterResponse extends SimpleResponse {
|
||||||
public String login;
|
public String login;
|
||||||
public String password;
|
public String password;
|
||||||
|
public String email;
|
||||||
public byte[] verifyHash;
|
public byte[] verifyHash;
|
||||||
@Override
|
@Override
|
||||||
public void execute(ChannelHandlerContext ctx, Client client) throws Exception
|
public void execute(ChannelHandlerContext ctx, Client client) throws Exception
|
||||||
|
@ -32,6 +33,7 @@ public void execute(ChannelHandlerContext ctx, Client client) throws Exception
|
||||||
}
|
}
|
||||||
User user = new User();
|
User user = new User();
|
||||||
user.username = login;
|
user.username = login;
|
||||||
|
user.email = email;
|
||||||
user.setPassword(password);
|
user.setPassword(password);
|
||||||
user.uuid = UUID.randomUUID();
|
user.uuid = UUID.randomUUID();
|
||||||
server.config.dao.userService.saveUser(user);
|
server.config.dao.userService.saveUser(user);
|
||||||
|
|
Loading…
Reference in a new issue