Available JHipster authentication types for JDL

You want to generate an application via JHipster, but you require to understand what authentication types are possible? Read on to understand the options.

Example JDL with authentication type

application {
config {
baseName mygateway
packageName com.xenvovation.my.gateway
applicationType gateway
      authenticationType oauth2
      buildTool maven
...
}
}

You can find all current supported authentication types in github in the typescript file authentication-types.ts
As of end of 2022 we are having:

Possible authentication type values

  • jwt
    JSON Web Tokens are a standard way (RFC 7519) to authenticate in between web applications. If you are unsure what to choose, take this JWT for your JHipster application.
  • oauth2
    this is probably the most secure way for your application. The thing is, that you need to understand OpenID Connect and therefore will require something like Keycloak or Okta in your project, even during development! Ensure to have the right skills aboard to be able to maintain e.g. a Keycloak (docker) container.
  • session
    This is the old way of authentication, since it uses a session during the user is logged in. With session authentication you will face issues with integrating this session over multiple nodes in microservices. So try to avoid it for usage in microserviced environments, where OAuth2 and JWT will do a much better and easier job for you.

Related articles

Available JHipster database types for JDL
Available JHipster build tool types for JDL
Available JHipster application types for JDL
Available JHipster client framework types for JDL
Available JHipster cache provider types for JDL

Share:

Facebook
Twitter
Pinterest
LinkedIn

Leave a Comment

Your email address will not be published. Required fields are marked *

Table of Contents

On Key

Related Posts