OAuth2 (без тестов и ошибка с java)
This commit is contained in:
committed by
skettiks
parent
e93d9b2c81
commit
06e2b50ba5
@@ -0,0 +1,16 @@
|
||||
package com.project.movienight.adapters.security.oauth2
|
||||
|
||||
class GoogleOAuth2UserInfo(
|
||||
private val attributes: Map<String, Any>
|
||||
) : OAuth2UserInfo {
|
||||
|
||||
override fun getProviderId(): String = attributes["sub"] as String
|
||||
|
||||
override fun getEmail(): String = attributes["email"] as String
|
||||
|
||||
override fun getName(): String = attributes["name"] as String
|
||||
|
||||
override fun getProvider(): String = "google"
|
||||
|
||||
override fun getAttributes(): Map<String, Any> = attributes
|
||||
}
|
||||
Reference in New Issue
Block a user