Does this jdl work?. I am using authenticationType session in gateway as well as microservices.

application {
  config {
    enableTranslation true
    applicationType gateway
    serviceDiscoveryType consul
    languages [en, hi, te]
    nativeLanguage en
    packageName in.beze.pc
    testFrameworks [gatling, cucumber, protractor]
    websocket spring-websocket
    baseName pc
    serverPort 8080
    jhiPrefix sys
    prodDatabaseType postgresql
    devDatabaseType postgresql
    databaseType sql
    cacheProvider ehcache
    enableHibernateCache true
    authenticationType session
    buildTool gradle
    clientPackageManager npm
    clientFramework angularX
  }
  entities *
}

application {
  config {
    baseName masters
    applicationType microservice
    packageName in.beze.masters
    serviceDiscoveryType consul
    authenticationType session
    prodDatabaseType postgresql
    devDatabaseType postgresql
    databaseType sql
    buildTool gradle
    serverPort 8081
    skipUserManagement true
    cacheProvider ehcache
    enableHibernateCache true
    websocket spring-websocket
  }
  entities Attachment, ContentType, Equipment, EquipmentType, FacilityType, FacilityGroupType, FacilityGroup, Facility, FacilityHistory, FacilityUser, FacilityAttachment, FacilityEquipment, FrequencyType, Frequency, Gender, JobSandbox, Language, Party, Permission, PermissionAuthority, ProductStoreType, ProductStore, ProductStoreFacility, ProductStoreUserGroup, Responsibility, RoleType, Scheduler, StatusCategory, Status, StatusValidChange, UserRole, UserGroup, UserGroupAuthority, UserGroupMember, Uom, UomType, UserAttachment, SystemParameters, QRCode, QRCodeType, QRCodeAttachment, Product, ProductType, ProductCategoryType, ProductCategory, ProductCategoryMember, Stage, ProductSpecGroup, ProductSpec, ProductSpecItem, StabilityCondition, StabilityConditionAttachment
}

application { config { baseName stability applicationType microservice packageName in.beze.stability serviceDiscoveryType consul authenticationType jwt prodDatabaseType postgresql devDatabaseType postgresql databaseType sql buildTool gradle serverPort 8082 skipUserManagement true cacheProvider ehcache enableHibernateCache true websocket spring-websocket } entities StAttachment, StContentType, AnalysisType, SpEquipment, SsEquipment, SpProductSpec, StabilityProgramme, StabilityAttachment, SampleType, StabilitySample, SampleResult, SampleAttachment, SampleResultAttachment, EquipmentSc }

Note that I am using Session in all microservices and gateway. Is it the correct way to generate microservices with one login per user.

1

There are 1 answers

2
Matt Raible On

No. JHipster doesn't support session-based authentication for microservices. Only JWT and OAuth are supported for microservices because of their distributed nature.

What are you hoping to accomplish with session-based authentication?