首页 > 解决方案 > Jhipster gateway 需要完整的身份验证才能访问此资源

问题描述

大家好,我正在 ubuntu os 上开发 Jhipster。我的项目设置已成功完成。但是在尝试测试 api 时,它给了我身份验证错误。

这是测试 API 时发生的错误。如果有人帮助我,我会很高兴。

错误:

rExceptionResolver : Resolved exception caused by Handler execution: org.springframework.security.authentication.InsufficientAuthenticationException: Full authentication is required to access this resource

网页浏览器

{
"type" : "https://www.jhipster.tech/problem/problem-with-message",
"title" : "Unauthorized",
"status" : 401,
"detail" : "Full authentication is required to access this resource",
"path" : "/api/account",
"message" : "error.http.401"
}

标签: javaapiweb-servicesauthenticationjhipster

解决方案


在我的情况下(在开发配置文件中),我更新了JWT 令牌,在所有应用程序(微服务、网关和注册表)中更改为 base64,此外,注释旧属性“秘密”并使用相同的密钥。然后正确地从网关测试 API,没有授权问题。

jh 版本 5.7.1


推荐阅读