Skip to content

Commit c9f358e

Browse files
committed
refactor : (#35) modify githubLoginFailure method to GithubAuthenticationController
1 parent 55d73ec commit c9f358e

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/main/kotlin/entry/dsm/gitauth/equusgithubauth/domain/auth/presentation/controller/GithubAuthenticationController.kt

+1-8
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import entry.dsm.gitauth.equusgithubauth.domain.auth.exception.InvalidAuthorizat
77
import entry.dsm.gitauth.equusgithubauth.domain.auth.presentation.response.GithubAccessTokenResponse
88
import entry.dsm.gitauth.equusgithubauth.domain.user.presentation.dto.response.LoginSuccessResponse
99
import entry.dsm.gitauth.equusgithubauth.domain.user.service.UserService
10-
import org.springframework.context.MessageSource
11-
import org.springframework.context.i18n.LocaleContextHolder
1210
import org.springframework.web.bind.annotation.GetMapping
1311
import org.springframework.web.bind.annotation.RequestHeader
1412
import org.springframework.web.bind.annotation.RequestMapping
@@ -22,7 +20,6 @@ class GithubAuthenticationController(
2220
private val generateGithubTokenService: GenerateGithubTokenService,
2321
private val userService: UserService,
2422
private val githubAuthProperties: GithubAuthProperties,
25-
private val messageSource: MessageSource
2623
) {
2724
@GetMapping
2825
fun githubAuth(): RedirectView {
@@ -57,10 +54,6 @@ class GithubAuthenticationController(
5754

5855
@GetMapping("/not/authentication")
5956
fun githubLoginFailure(): String {
60-
return messageSource.getMessage(
61-
"githubAuthProperties.failure",
62-
null,
63-
LocaleContextHolder.getLocale()
64-
)
57+
return githubAuthProperties.failure
6558
}
6659
}

0 commit comments

Comments
 (0)