When the user is idle for more than 5 minutes, access from the browser to microservice is not authenticated.
After 5 minute idle, access to the entire menu in the gateway, no need for authentication, only related to the microservice that needs authentication. For public users, it will be a bit confusing.
jhipster info
INFO! Using JHipster version installed locally in current project's node_modules
INFO! Executing jhipster:info
INFO! Options: from-cli: true
Welcome to the JHipster Information Sub-Generator
[email protected] D:\tmp\check-zuul\gw
`-- [email protected]
##### **JHipster configuration, a `.yo-rc.json` file generated in the root folder**
{
"generator-jhipster": {
"promptValues": {
"packageName": "com.mycompany"
},
"jhipsterVersion": "6.0.0",
"applicationType": "gateway",
"baseName": "gateway",
"packageName": "com.mycompany",
"packageFolder": "com/mycompany",
"serverPort": "8080",
"authenticationType": "oauth2",
"cacheProvider": "ehcache",
"enableHibernateCache": false,
"websocket": false,
"databaseType": "sql",
"devDatabaseType": "h2Disk",
"prodDatabaseType": "mysql",
"searchEngine": false,
"messageBroker": false,
"serviceDiscoveryType": "eureka",
"buildTool": "maven",
"enableSwaggerCodegen": false,
"clientFramework": "angularX",
"clientTheme": "none",
"clientThemeVariant": "",
"useSass": true,
"clientPackageManager": "npm",
"testFrameworks": [],
"jhiPrefix": "jhi",
"entitySuffix": "",
"dtoSuffix": "DTO",
"otherModules": [],
"enableTranslation": false
}
}
entityName.json files generated in the .jhipster directory
JDL entity definitions
entity Data1 {
description String
}
dto Data1 with mapstruct
paginate Data1 with pagination
service Data1 with serviceClass
microservice Data1 with svc
clientRootFolder Data1 with svc
java version "1.8.0_202"
Java(TM) SE Runtime Environment (build 1.8.0_202-b08)
Java HotSpot(TM) 64-Bit Server VM (build 25.202-b08, mixed mode)
git version 2.19.1.windows.1
node: v10.15.3
npm: 6.9.0
yeoman: 2.0.6
yarn: 1.9.4
Docker version 18.09.2, build 6247962
docker-compose version 1.23.2, build 1110ad01
jhipster info
INFO! Using JHipster version installed locally in current project's node_modules
INFO! Executing jhipster:info
INFO! Options: from-cli: true
Welcome to the JHipster Information Sub-Generator
[email protected] D:\tmp\check-zuul\svc
`-- [email protected]
##### **JHipster configuration, a `.yo-rc.json` file generated in the root folder**
{
"generator-jhipster": {
"promptValues": {
"packageName": "com.mycompany"
},
"jhipsterVersion": "6.0.0",
"applicationType": "microservice",
"baseName": "svc",
"packageName": "com.mycompany",
"packageFolder": "com/mycompany",
"serverPort": "8082",
"authenticationType": "oauth2",
"cacheProvider": "hazelcast",
"enableHibernateCache": false,
"websocket": false,
"databaseType": "sql",
"devDatabaseType": "h2Disk",
"prodDatabaseType": "mysql",
"searchEngine": false,
"messageBroker": false,
"serviceDiscoveryType": "eureka",
"buildTool": "maven",
"enableSwaggerCodegen": false,
"jwtSecretKey": "bXktc2VjcmV0LXRva2VuLXRvLWNoYW5nZS1pbi1wcm9kdWN0aW9uLWFuZC10by1rZWVwLWluLWEtc2VjdXJlLXBsYWNl",
"testFrameworks": [],
"jhiPrefix": "jhi",
"entitySuffix": "",
"dtoSuffix": "DTO",
"otherModules": [],
"enableTranslation": false,
"clientPackageManager": "npm",
"skipClient": true,
"skipUserManagement": true
}
}
entityName.json files generated in the .jhipster directory
JDL entity definitions
entity Data1 {
description String
}
dto Data1 with mapstruct
paginate Data1 with pagination
service Data1 with serviceClass
microservice Data1 with svc
clientRootFolder Data1 with svc
java version "1.8.0_202"
Java(TM) SE Runtime Environment (build 1.8.0_202-b08)
Java HotSpot(TM) 64-Bit Server VM (build 25.202-b08, mixed mode)
git version 2.19.1.windows.1
node: v10.15.3
npm: 6.9.0
yeoman: 2.0.6
yarn: 1.9.4
Docker version 18.09.2, build 6247962
docker-compose version 1.23.2, build 1110ad01
First Open Page:

After 5 Minute, and click edit in Form:


You mentioned "Microsoft". Are you using Microsoft as your OIDC provider? If so, does the same behavior happen with Keycloak?
No that is typo, not microsoft, I mean microservice.
OIDC that I use keycloak 6.0.1.
Hmmm, it sounds like Spring Security might not be fetching refresh tokens and renewing access tokens for you. I'm not sure how to fix just yet.