Skip to content

Commit

Permalink
Merge pull request #398 from Team-Ampersand/feat/logginghttp
Browse files Browse the repository at this point in the history
delte :: jwt, error filter component @
  • Loading branch information
esperar committed Aug 8, 2024
2 parents d099f44 + 31ddbc1 commit 147fa2c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 60 deletions.
16 changes: 8 additions & 8 deletions src/main/kotlin/com/dotori/v2/global/security/SecurityConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,17 @@ class SecurityConfig(
.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS)
.and()
.authorizeHttpRequests()

.antMatchers(HttpMethod.GET, "/").permitAll()

.antMatchers("/actuator/**").permitAll()
.antMatchers("/v2/auth/**").permitAll()
.antMatchers("/v2/health-check").permitAll()
.antMatchers("/v2/refresh").permitAll()

.antMatchers(HttpMethod.GET, "/v2/home/board").authenticated()
.antMatchers(HttpMethod.GET, "/v2/home").authenticated()

.antMatchers("/v2/admin/**").hasRole("ADMIN")
.antMatchers("/v2/member/**").hasRole("MEMBER")
.antMatchers("/v2/councillor/**").hasRole("COUNCILLOR")
Expand All @@ -57,20 +63,14 @@ class SecurityConfig(
.antMatchers("/v2/email/**").permitAll()

.antMatchers("/v2/members/**").authenticated()

.antMatchers(HttpMethod.GET, "/v2/home/board").authenticated()
.antMatchers(HttpMethod.GET, "/v2/home").authenticated()

.mvcMatchers(HttpMethod.GET, "/").permitAll()

.anyRequest().denyAll()
.and()
.exceptionHandling()
.accessDeniedHandler(CustomAccessDeniedHandler())
.authenticationEntryPoint(CustomAuthenticationEntryPointHandler())
.and()
.addFilterBefore(jwtRequestFilter, JwtReqFilter::class.java)
.addFilterBefore(errorFilter, ErrorFilter::class.java)
.addFilterBefore(jwtRequestFilter, UsernamePasswordAuthenticationFilter::class.java)
.addFilterBefore(errorFilter, JwtReqFilter::class.java)
return http.build()
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import org.springframework.stereotype.Component
import java.time.Duration
import java.time.LocalDateTime

@Aspect
@Component
//@Aspect
//@Component
class ReservationIndicatorAspect(
private val reservationIndicatorsRepository: ReservationIndicatorsRepository
) {
Expand Down

0 comments on commit 147fa2c

Please sign in to comment.