In order to use login, firstly extends AuthenticationDaoImpl to UiMainClass UiMainClass extends AuthenticationDaoImpl
to use login, validation, logout service, encrytion service.
- add user by creating object as admin type
User u1 = new User("user", "password", "type");
service.addUser(store, u1); // retrun type string
- add user by creating object as normal user type
User u1 = new User(user, password);
service.addUser(store, u1); // retrun type string
- add user with username and password
service.addUser(store, username, password) // retrun type string
_This validation password password that contain only number[0-9], alphbade[a-z], and special character , -, *. Min length is 6 and Max length is 15.
String regex = "^[a-z0-9_-[*]]{6,15}$";
Change this regex accordingly to do validation
User Password is encryped by using md5 hasing.
- Login Method
loginCheck(username, password); //return type String
- Forget Password Method
forgetPassword(username, newpassword); // retrun type string
- Get current login
this.getLoginUser(); // return type string (Id)
- Logout
this.logout(username); // retrun type string