Skip to content

Commit 4676097

Browse files
committed
feat : (#31) GoogleUserDetails
1 parent 67dda25 commit 4676097

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)