Skip to content

Commit 71db75e

Browse files
committed
chore : (#31) remove github logic
1 parent 7d31897 commit 71db75e

File tree

7 files changed

+31
-281
lines changed

7 files changed

+31
-281
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,31 @@
1-
package entry.dsm.gitauth.equusgithubauth.domain.auth.presentation.controller
2-
3-
import entry.dsm.gitauth.equusgithubauth.domain.user.presentation.dto.response.TokenResponse
4-
import entry.dsm.gitauth.equusgithubauth.domain.user.service.UserService
5-
import org.springframework.security.core.annotation.AuthenticationPrincipal
6-
import org.springframework.security.oauth2.core.user.OAuth2User
7-
import org.springframework.web.bind.annotation.GetMapping
8-
import org.springframework.web.bind.annotation.RequestMapping
9-
import org.springframework.web.bind.annotation.RestController
10-
11-
@RestController
12-
@RequestMapping("/api/github/auth")
13-
class GithubAuthenticationController(
14-
val userService: UserService,
15-
) {
16-
@GetMapping
17-
fun githubAuth(): String {
18-
return "redirect:/oauth2/authorization/github"
19-
}
20-
21-
@GetMapping("/authenticated/")
22-
fun getGithubUserInfo(
23-
@AuthenticationPrincipal oAuth2User: OAuth2User,
24-
): TokenResponse {
25-
return userService.execute(oAuth2User)
26-
}
27-
28-
@GetMapping("/not/authenticated/")
29-
fun notAuthenticated(): String {
30-
return "Not authenticated"
31-
}
32-
}
1+
//package entry.dsm.gitauth.equusgithubauth.domain.auth.presentation.controller
2+
//
3+
//import entry.dsm.gitauth.equusgithubauth.domain.user.presentation.dto.response.TokenResponse
4+
//import org.springframework.security.core.annotation.AuthenticationPrincipal
5+
//import org.springframework.security.oauth2.core.user.OAuth2User
6+
//import org.springframework.web.bind.annotation.GetMapping
7+
//import org.springframework.web.bind.annotation.RequestMapping
8+
//import org.springframework.web.bind.annotation.RestController
9+
//
10+
//@RestController
11+
//@RequestMapping("/api/github/auth")
12+
//class GithubAuthenticationController(
13+
// val userService: UserService,
14+
//) {
15+
// @GetMapping
16+
// fun githubAuth(): String {
17+
// return "redirect:/oauth2/authorization/github"
18+
// }
19+
//
20+
// @GetMapping("/authenticated/")
21+
// fun getGithubUserInfo(
22+
// @AuthenticationPrincipal oAuth2User: OAuth2User,
23+
// ): TokenResponse {
24+
// return userService.execute(oAuth2User)
25+
// }
26+
//
27+
// @GetMapping("/not/authenticated/")
28+
// fun notAuthenticated(): String {
29+
// return "Not authenticated"
30+
// }
31+
//}

src/main/kotlin/entry/dsm/gitauth/equusgithubauth/domain/auth/presentation/dto/GithubUserInformation.kt

-15
This file was deleted.

src/main/kotlin/entry/dsm/gitauth/equusgithubauth/domain/auth/service/GithubUserService.kt

-97
This file was deleted.

src/main/kotlin/entry/dsm/gitauth/equusgithubauth/domain/auth/service/GithubUserTokenValidationService.kt

-22
This file was deleted.

src/main/kotlin/entry/dsm/gitauth/equusgithubauth/domain/auth/service/GithubUserValidationService.kt

-35
This file was deleted.

src/main/kotlin/entry/dsm/gitauth/equusgithubauth/domain/user/service/UserService.kt

-41
This file was deleted.

src/main/kotlin/entry/dsm/gitauth/equusgithubauth/global/security/auth/AuthDetails.kt

-39
This file was deleted.

0 commit comments

Comments
 (0)