Skip to content

Commit

Permalink
chore: logging 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
egg528 committed Mar 31, 2024
1 parent 4f570c2 commit 951628e
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class StateOAuth2AuthorizationRequestRepository(
.build()

override fun loadAuthorizationRequest(request: HttpServletRequest): OAuth2AuthorizationRequest? {
return oauthRequestStorage.getIfPresent(getStateParameter(request))
return oauthRequestStorage.getIfPresent(getState(request))
}

override fun saveAuthorizationRequest(
Expand All @@ -33,8 +33,7 @@ class StateOAuth2AuthorizationRequestRepository(
if (authorizationRequest != null) {
/*** for frontend dev test ***/
if (profilePlaceHolder.isDev()) {
log.info("save referer: {}", request.getParameter("referer"))
loginRequestRefererStorage.put(authorizationRequest.state, request.getParameter("referer"))
loginRequestRefererStorage.put(authorizationRequest.state, getReferer(request))
}

oauthRequestStorage.put(authorizationRequest.state, authorizationRequest)
Expand All @@ -48,5 +47,7 @@ class StateOAuth2AuthorizationRequestRepository(
return loadAuthorizationRequest(request)
}

private fun getStateParameter(request: HttpServletRequest): String = request.getParameter("state")
private fun getState(request: HttpServletRequest): String = request.getParameter("state")

private fun getReferer(request: HttpServletRequest): String = request.getHeader("referer")
}

0 comments on commit 951628e

Please sign in to comment.