最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

spring boot - JWT authentication folder missing in security after generating a microservice with JHipster - Stack Overflow

programmeradmin4浏览0评论

I have generated a microservice using JHipster with JWT authentication, but I can't find the security/jwt folder that usually appears in src/main/java/.../security

Here are the choices I made during the microservice setup:

Project name: enrolementApi

Application type: Microservice

Java package: sn.synapsys.conseils

Build tool: Maven

Spring WebFlux: Yes

Server port: 8081

Service discovery: JHipster Registry (Eureka)

Authentication type: JWT Authentication

Database: PostgreSQL (both development and production)

API First with OpenAPI: Yes

Microfrontend: None (no client)

Internationalization: No

Issue After generating the project, I can't find the security/jwt folder or the related classes (TokenProvider, JWTFilter, etc.). However, I explicitly selected JWT authentication during the setup.

Questions Has JHipster changed the file structure in recent versions?

Do I need to manually enable or configure something to generate these files?

Is there a command to regenerate only the security part?

On my previous microservice i was using :

Authentication authentication = new UsernamePasswordAuthenticationToken(login, password); String token = tokenProvider.createToken(authentication, false); 

To generate a token, how can i generate the token with spring security ?

Thanks in advance for your help!

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论