Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/346.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 使用Jhipster集成前端和后端的身份验证_Java_Angularjs_Authentication_Jhipster - Fatal编程技术网

Java 使用Jhipster集成前端和后端的身份验证

Java 使用Jhipster集成前端和后端的身份验证,java,angularjs,authentication,jhipster,Java,Angularjs,Authentication,Jhipster,我正在用JHipster配置后端(Java)和前端(AngularJS) 我想使用我自己的前端代码,它是AngularJS,而不是JHipster生成的代码 问题是: 在后端的任何API调用后,我都会收到一个身份验证错误。 有没有办法在后端禁用身份验证检查,或者我必须在前端添加整个身份验证过程?根据您的问题,我的回答假设您要为您的rest禁用身份验证检查 为此,请浏览到SecurityConfiguration.java 并更改HttpSecurity配置 改变 .antMatchers("/a

我正在用JHipster配置后端(Java)和前端(AngularJS)

我想使用我自己的前端代码,它是AngularJS,而不是JHipster生成的代码

问题是:

在后端的任何API调用后,我都会收到一个身份验证错误。

有没有办法在后端禁用身份验证检查,或者我必须在前端添加整个身份验证过程?

根据您的问题,我的回答假设您要为您的
rest禁用身份验证检查

为此,请浏览到
SecurityConfiguration.java

并更改
HttpSecurity
配置

改变

.antMatchers("/api/**").authenticated();


注意:任何
REST
备份服务器都必须使用安全性。

应用程序不需要身份验证吗?谢谢……我确实需要检查身份验证……但我想知道尽管您想使用自己的代码,但从jhipster生成的文件中重用一些非常有用的客户端javascript文件是一个不错的选择,例如
Auth服务、Principle服务以及更多的
。我会使用几乎所有的文件:D。
.antMatchers("/api/**").permitAll();