【发布时间】:2017-07-12 14:31:26
【问题描述】:
我创建了名为 Bookstore 的 j hipster 应用程序。运行我的应用程序后,它将进行身份验证。我不需要这个身份验证。如果有什么方法可以在没有 j hipster 登录页面的情况下打开我的应用程序?
【问题讨论】:
标签: java spring-security jwt jhipster spring-security-oauth2
我创建了名为 Bookstore 的 j hipster 应用程序。运行我的应用程序后,它将进行身份验证。我不需要这个身份验证。如果有什么方法可以在没有 j hipster 登录页面的情况下打开我的应用程序?
【问题讨论】:
标签: java spring-security jwt jhipster spring-security-oauth2
在路径“app/config”中有类 MicroserviceSecurityConfiguration.class 在这种情况下更改那里的权限
("/api/**").Authenticated()
为
("/api/**").permitAll()
【讨论】:
禁用身份验证:
.antMatchers("/api/**").authenticated() 替换为 .antMatchers("/**").permitAll()
*jhiHasAnyAuthority 的所有指令在所有 *.html 文件中[ngSwitch]="isAuthenticated() 的所有指令以及所有 *ngSwitchCase 中删除
checkLogin( 方法中返回 true【讨论】:
假设您要构建一个保留 JHipster 管理功能的应用程序:
*jhiHasAnyAuthorities 指令【讨论】: