This commit is contained in:
zhouhao
2018-10-10 15:08:03 +08:00
parent 13471f98a4
commit 98a7f7d442
4 changed files with 89 additions and 3 deletions

View File

@@ -55,6 +55,7 @@ public class EmbedAuthenticationManager implements AuthenticationManager {
}
}
}
authentications.put(id, properties.toAuthentication(dataAccessConfigBuilderFactory));
});
}
@@ -66,7 +67,7 @@ public class EmbedAuthenticationManager implements AuthenticationManager {
((PlainTextUsernamePasswordAuthenticationRequest) request).getUsername().equals(user.getUsername())
&& ((PlainTextUsernamePasswordAuthenticationRequest) request).getPassword().equals(user.getPassword()))
.findFirst()
.map(properties -> properties.toAuthentication(dataAccessConfigBuilderFactory))
.map(properties -> authentications.get(properties.getId()))
.orElseThrow(() -> new ValidationException("用户不存在")));
}