-
Notifications
You must be signed in to change notification settings - Fork 0
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
added security component, added user to the model #6
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Superb! However, please, check my some suggestions:)
private final AuthenticationService authenticationService; | ||
|
||
@PostMapping("/login") | ||
public UserLoginResponseDto login(@RequestBody UserLoginRequestDto requestDto) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, add the @Valid annotation)
- column: | ||
name: user_id | ||
type: bigint | ||
constraints: | ||
nullable: false | ||
- column: | ||
name: role_id | ||
type: bigint | ||
constraints: | ||
nullable: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add constraints to this table:
PK (user_id, role_id)
FK (user_id)
FK (role_id)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, add constraints please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GJ. Left few comments, they are minor but review them
.anyRequest() | ||
.authenticated() | ||
) | ||
.httpBasic(Customizer.withDefaults()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since you added JWT security httpBasic is no more needed actually
|
||
@Data | ||
public class UserLoginRequestDto { | ||
@NotEmpty |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- column: | ||
name: user_id | ||
type: bigint | ||
constraints: | ||
nullable: false | ||
- column: | ||
name: role_id | ||
type: bigint | ||
constraints: | ||
nullable: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, add constraints please
…amed key project package
No description provided.