我在Grails(Spring Security)中为我的API提供了一个自定义提供程序:
@Component class ApiAuthenticationProvider implements AuthenticationProvider {
@Autowired
TokenGenerator tokenGenerator
@Autowired
PasswordEncoder passwordEncoder
@Autowired
ApiTokenStorageService tokenStorageService
@Override
Authentication authenticate(Authentication authentication) throws AuthenticationException {
...
authentication.getDetails() }
现在我有我发送的Json:
{
"username" : "username",
"password" : "password123",
"details" : {"uuid":"0000-0000-0000-0000-0000000"}
}
我可以在身份验证方法中获得用户名和密码,但不能获得“ uuid”。身份验证中的这些详细信息如何工作?