Skip to content
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

Merged
merged 10 commits into from
Oct 2, 2023

Conversation

BlueVioletTeti
Copy link
Owner

No description provided.

Copy link

@ivan0dyatlyukkk ivan0dyatlyukkk left a 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) {

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)

Comment on lines 9 to 18
- column:
name: user_id
type: bigint
constraints:
nullable: false
- column:
name: role_id
type: bigint
constraints:
nullable: false

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)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, add constraints please

Base automatically changed from dev-pagination to master September 28, 2023 10:51
Copy link

@vovasalyha vovasalyha left a 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())

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@notempty and @notblank are mostly useless here as you anyway validate the length of string in Size annotation. So you can replace @notempty and @notblank by @NotNull

Comment on lines 9 to 18
- column:
name: user_id
type: bigint
constraints:
nullable: false
- column:
name: role_id
type: bigint
constraints:
nullable: false

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, add constraints please

@BlueVioletTeti BlueVioletTeti merged commit d5bbf53 into master Oct 2, 2023
2 checks passed
@BlueVioletTeti BlueVioletTeti deleted the dev-security branch October 2, 2023 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants