Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/401.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 仅使用用户名但不使用密码的Spring安全身份验证,如果登录成功,我需要生成令牌_Java_Hibernate_Spring Security - Fatal编程技术网

Java 仅使用用户名但不使用密码的Spring安全身份验证,如果登录成功,我需要生成令牌

Java 仅使用用户名但不使用密码的Spring安全身份验证,如果登录成功,我需要生成令牌,java,hibernate,spring-security,Java,Hibernate,Spring Security,我需要基于无密码的身份验证生成令牌,但我们应该提供用户名我使用spring security内置类获取用户 通过只知道用户名进行身份验证 这是我的密码 Authentication Authentication=new UsernamePasswordAuthenticationToken(userObj.getUserId(),“”, 授权机构) 我使用spring security内置类来获取用户 通过只知道用户名进行身份验证 这是我的密码 Authentication Authentica

我需要基于无密码的身份验证生成令牌,但我们应该提供用户名

我使用spring security内置类获取用户

通过只知道用户名进行身份验证

这是我的密码

Authentication Authentication=new UsernamePasswordAuthenticationToken(userObj.getUserId(),“”,
授权机构)

我使用spring security内置类来获取用户

通过只知道用户名进行身份验证

这是我的密码

Authentication Authentication=new UsernamePasswordAuthenticationToken(userObj.getUserId(),“”,
授权机构)

您可以共享“GrantedAuthories”值的值吗?您可以共享“GrantedAuthories”值的值吗?