Skip to content

Commit

Permalink
update :: null 처리 테스트
Browse files Browse the repository at this point in the history
  • Loading branch information
4mjeo committed Feb 28, 2024
1 parent 78bb9d2 commit e2c50aa
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import org.springframework.security.oauth2.core.DefaultOAuth2AuthenticatedPrinci
import org.springframework.security.oauth2.server.resource.authentication.BearerTokenAuthentication
import org.springframework.stereotype.Component
import org.springframework.web.filter.OncePerRequestFilter
import java.util.*

@Component
@Order(-100)
Expand Down Expand Up @@ -51,10 +52,9 @@ class AuthenticationFilter(
}

private fun setAuthenticationByHeader(request: HttpServletRequest) {

val requestUserId = request.getHeader("Request-User-Id")
val requestUserAuthority = request.getHeader("Request-User-Authorities")
val requestUserRole = request.getHeader("Request-User-Role")
var requestUserId = request.getHeader("Request-User-Id") ?: UUID.randomUUID().toString()
var requestUserAuthority = request.getHeader("Request-User-Authorities") ?: "STU"
var requestUserRole = request.getHeader("Request-User-Role") ?: "STU"

val simpleGrantedAuthorities = requestUserAuthority.toList().let { authorities ->
buildRequestAuthoritiesAndRole(requestUserRole, authorities)
Expand Down

0 comments on commit e2c50aa

Please sign in to comment.