Maingate - Hybeim SDK를 통한 Steam 로그인 처리

This commit is contained in:
2024-06-11 11:54:17 +09:00
parent d3e72a2e4b
commit e862ff3717
2 changed files with 173 additions and 0 deletions

View File

@ -57,6 +57,7 @@ const (
AuthPlatformMicrosoft = "microsoft"
AuthPlatformApple = "apple"
AuthPlatformTwitter = "twitter"
AuthPlatformHybeim = "hybeim"
)
const (
@ -98,6 +99,11 @@ type maingateConfig struct {
SteamAppId string `json:"steam_app_id"`
SteamPublisherAuthKey string `json:"steam_publisher_authkey"`
GlobalMaingateToken string `json:"maingate_api_token"`
HybeImProjectIdstring string `json:"hybeim_projectid"`
HybeImServiceIdstring string `json:"hybeim_serviceid"`
HybeImAccessKey string `json:"hybeim_acesskey"`
HybeImEndPoint string `json:"hybeim_Endpoint"`
Firebase_Google_Analytics_JS_SDK_Config
}
@ -548,6 +554,8 @@ func (mg *Maingate) RegisterHandlers(ctx context.Context, serveMux *http.ServeMu
serveMux.HandleFunc(gocommon.MakeHttpHandlerPattern(prefix, "authorize_sdk", AuthPlatformSteamSDK), mg.platform_steamsdk_authorize)
serveMux.HandleFunc(gocommon.MakeHttpHandlerPattern(prefix, "authorize_sdk", AuthPlatformHybeim), mg.platform_hybeim_authorize)
go mg.watchServiceCollection(ctx, serveMux, prefix)
go mg.watchFileCollection(ctx, serveMux, prefix)
// fsx := http.FileServer(http.Dir("console"))
@ -671,6 +679,8 @@ func (mg *Maingate) updateUserinfo(info usertokeninfo) (bool, string, string) {
success, userid, email = mg.platform_google_getuserinfo(info)
case AuthPlatformSteamSDK:
success, userid, email = mg.platform_steamsdk_getuserinfo(info)
case AuthPlatformHybeim:
success, userid, email = mg.platform_hybeim_getuserinfo(info)
case AuthPlatformFirebaseAuth:
success, userid, email = mg.platform_firebase_getuserinfo(info)
}