Commit 7872a715 authored by Jie Yuan's avatar Jie Yuan
Browse files

add b2access user resolver

parent 678f752f
......@@ -125,6 +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();
......@@ -134,7 +135,6 @@ public class AAILoginService {
user.setEmail(email);
user.setIsEnabled(true);
user.setRole("USER");
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 +146,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