Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
jorbush committed Sep 20, 2024
1 parent ce63ab2 commit 6031f45
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ public PasswordEncoder passwordEncoder() {

@Bean
public AuthenticationManager authenticationManagerBean(final HttpSecurity http) throws Exception {
AuthenticationManagerBuilder authenticationManagerBuilder = http.getSharedObject(AuthenticationManagerBuilder.class);
authenticationManagerBuilder.userDetailsService(userDetailsService).passwordEncoder(passwordEncoder());
AuthenticationManagerBuilder authenticationManagerBuilder =
http.getSharedObject(AuthenticationManagerBuilder.class);
authenticationManagerBuilder
.userDetailsService(userDetailsService)
.passwordEncoder(passwordEncoder());
return authenticationManagerBuilder.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ public ResponseEntity<?> registerUser(@Validated @RequestBody final SignUpReques
}

@PostMapping(value = "/signin", produces = "application/json")
public ResponseEntity<?> authenticateUser(@Validated @RequestBody final LoginRequest loginRequest) {
public ResponseEntity<?> authenticateUser(
@Validated @RequestBody final LoginRequest loginRequest) {
try {
System.out.println("Received loginRequest: " + loginRequest.getUsername());
Authentication authentication =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ public class JwtAuthenticationFilter extends OncePerRequestFilter {

@Override
protected void doFilterInternal(
final HttpServletRequest request, final HttpServletResponse response, final FilterChain filterChain)
final HttpServletRequest request,
final HttpServletResponse response,
final FilterChain filterChain)
throws ServletException, IOException {
try {
String jwt = getJwtFromRequest(request);
Expand Down

0 comments on commit 6031f45

Please sign in to comment.