-
-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generating a blog app with OAuth 2.0 fails to compile #144
Comments
@mraible as for now the Oauth2 does not produce a User entity as upstream JHipster. I guess in your JDL your Blog entity has a relation to the User entity. |
IMO, it should match what the main generator does. The Micronaut blueprint has this capability. I ran it through similar tests when its OAuth support was being developed. |
I'm not comfortable with generating User domain object when there is no user management and authentication actually managed by the application. (I'm not with the upstream generator too BTW). In the Blog sample, we need a user mainly to fullfill the Blog ownership relation. I tend to separate the authentication/authorization aspect of the User from it's data segregation function which is domain dependant. AFAIK, .Net Core or nodejs blueprints aren't implementing it neither. |
Since you're the maintainer of this blueprint, the choice is up to you. I thought it was a cool feature when I added it to the main generator because it allows you to create relationships with the If you try to create a JWT-based microservice with a relationship to If you have entities that need a relationship to the current user, how would you suggest a developer implements it? The "save the user right after they log in" implementation might not be ideal. A better solution would be to use something like Okta Event Hooks which can call an endpoint to sync a user when they're created. However, I don't think Keycloak has anything like that, and it's not a standard part of OAuth. FWIW, this does work in the Micronaut blueprint. I haven't tested this JDL with the .NET Core or Node.js blueprint, but I'd be happy to sponsor their implementation. |
If I try this now, it results in the following error:
|
Describe the bug
I tried generating an app with the
blog-oauth2.jdl
. It fails to compile.To Reproduce
Unfortunately, this results in a compilation error.
The text was updated successfully, but these errors were encountered: