Commit 75fe11bc authored by Jie Yuan's avatar Jie Yuan
Browse files

change aai

parent 464fcf0a
......@@ -125,7 +125,7 @@ public class AAILoginService {
String email = details.get("email");
UserInfo user = userRepository.findByEmail(email);
String pwd = email + "12%3A~A+a0=@abb";
if( user == null ) {
user = new UserInfo();
user.setUsername(details.get("name"));
......@@ -134,7 +134,8 @@ public class AAILoginService {
user.setEmail(email);
user.setIsEnabled(true);
user.setRole("USER");
String pwd = this.generateRandomStr(20);
//String pwd = this.generateRandomStr(20);
user.setPassword(passwordEncoder.encode(pwd));
userRepository.save(user);
log.info("B2ACCESSUser with " + email + " has been saved at {} ", dateFormat.format(new Date()));
......@@ -146,7 +147,7 @@ public class AAILoginService {
Authentication authentication = authenticationManager.authenticate(
new UsernamePasswordAuthenticationToken(
user.getUsername(),
user.getPassword()
pwd
)
);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment