We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 67dda25 commit 4676097Copy full SHA for 4676097
src/main/kotlin/entry/dsm/gitauth/equusgithubauth/global/security/auth/GoogleUserDetails.kt
@@ -0,0 +1,24 @@
1
+package entry.dsm.gitauth.equusgithubauth.global.security.auth
2
+
3
+import entry.dsm.gitauth.equusgithubauth.global.oauth.OAuth2UserInfo
4
5
+data class GoogleUserDetails(
6
+ private val attributes: Map<String, Any>
7
+) : OAuth2UserInfo {
8
9
+ override fun getProvider(): String {
10
+ return "google"
11
+ }
12
13
+ override fun getProviderId(): String {
14
+ return attributes["sub"] as String
15
16
17
+ override fun getEmail(): String {
18
+ return attributes["email"] as String
19
20
21
+ override fun getName(): String {
22
+ return attributes["name"] as String
23
24
+}
0 commit comments