com.xd.sdk.account 6.29.0 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (205) hide show
  1. package/Plugins/Android/libs/XDGAccount_7.0.0.aar +0 -0
  2. package/{Mobile/Plugins/Android/com/xd/account/bridge/XDGAccountBridge.java.meta → Plugins/Android/libs/XDGAccount_7.0.0.aar.meta} +2 -2
  3. package/Plugins/Android/libs/XDGBridgeAccount_v7_7.0.0.aar +0 -0
  4. package/{Mobile/Plugins/Android/com/xd/account/bridge/XDGLoginServiceUnity.java.meta → Plugins/Android/libs/XDGBridgeAccount_v7_7.0.0.aar.meta} +2 -2
  5. package/Plugins/Android/libs/XDGSupport_7.0.0.aar +0 -0
  6. package/{Mobile/Plugins/Android/com/xd/account/bridge/XDGLoginServiceUnityImpl.java.meta → Plugins/Android/libs/XDGSupport_7.0.0.aar.meta} +2 -2
  7. package/Plugins/Android/libs.meta +1 -1
  8. package/Plugins/Android.meta +1 -1
  9. package/Plugins/iOS/XDAccountSDK.framework/Headers/TDSGlobalThirdPartyLoginHelper.h +2 -8
  10. package/Plugins/iOS/XDAccountSDK.framework/Headers/TDSGlobalThirdPartyLoginHelper.h.meta +1 -1
  11. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDAccountSDK-Swift.h +329 -0
  12. package/Plugins/iOS/XDAccountSDK.framework/Headers/{TDSGlobalThirdPartyLoginManager.h.meta → XDAccountSDK-Swift.h.meta} +1 -1
  13. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDAccountSDK.h +1 -2
  14. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDAccountSDK.h.meta +1 -1
  15. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGAccount.h +29 -43
  16. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGAccount.h.meta +1 -1
  17. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGAccountDefines.h +43 -0
  18. package/Plugins/iOS/XDAccountSDK.framework/Headers/{XDGPhoneAuthManager.h.meta → XDGAccountDefines.h.meta} +1 -1
  19. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGAccountVersion.h +3 -3
  20. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGAccountVersion.h.meta +1 -1
  21. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGLogger+Account.h +3 -0
  22. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGLogger+Account.h.meta +1 -1
  23. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGLoginEntriesConfig.h.meta +1 -1
  24. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGLoginService.h.meta +1 -1
  25. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGTapLoginPermissionDialog.h.meta +1 -1
  26. package/Plugins/iOS/XDAccountSDK.framework/Headers.meta +1 -1
  27. package/Plugins/iOS/XDAccountSDK.framework/Info.plist +0 -0
  28. package/Plugins/iOS/XDAccountSDK.framework/Info.plist.meta +1 -1
  29. package/Plugins/iOS/XDAccountSDK.framework/Modules/XDAccountSDK.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
  30. package/Plugins/iOS/XDAccountSDK.framework/{Headers/XDGRoleInfo.h.meta → Modules/XDAccountSDK.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo.meta} +1 -1
  31. package/{Mobile/Http.meta → Plugins/iOS/XDAccountSDK.framework/Modules/XDAccountSDK.swiftmodule/Project.meta} +1 -1
  32. package/Plugins/iOS/XDAccountSDK.framework/Modules/XDAccountSDK.swiftmodule/arm64-apple-ios.abi.json +9 -0
  33. package/Plugins/iOS/XDAccountSDK.framework/Modules/XDAccountSDK.swiftmodule/arm64-apple-ios.abi.json.meta +7 -0
  34. package/Plugins/iOS/XDAccountSDK.framework/Modules/XDAccountSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  35. package/Plugins/iOS/XDAccountSDK.framework/Modules/XDAccountSDK.swiftmodule/arm64-apple-ios.swiftdoc.meta +7 -0
  36. package/Plugins/iOS/XDAccountSDK.framework/Modules/XDAccountSDK.swiftmodule/arm64-apple-ios.swiftmodule +0 -0
  37. package/Plugins/iOS/XDAccountSDK.framework/Modules/XDAccountSDK.swiftmodule/arm64-apple-ios.swiftmodule.meta +7 -0
  38. package/{Mobile/Editor.meta → Plugins/iOS/XDAccountSDK.framework/Modules/XDAccountSDK.swiftmodule.meta} +1 -1
  39. package/Plugins/iOS/XDAccountSDK.framework/Modules/module.modulemap.meta +1 -1
  40. package/Plugins/iOS/XDAccountSDK.framework/Modules.meta +1 -1
  41. package/Plugins/iOS/XDAccountSDK.framework/XDAccountSDK +0 -0
  42. package/Plugins/iOS/XDAccountSDK.framework/XDAccountSDK.meta +1 -1
  43. package/Plugins/iOS/XDAccountSDK.framework.meta +4 -4
  44. package/Plugins/iOS.meta +1 -1
  45. package/Plugins.meta +1 -1
  46. package/Runtime/Internal/IXDGAccount.Extended.cs +11 -0
  47. package/{Mobile/Http/XDGAccountHttpConfigMobile.cs.meta → Runtime/Internal/IXDGAccount.Extended.cs.meta} +1 -1
  48. package/Runtime/Internal/Mobile/AccountFeaturesImpl.cs +348 -0
  49. package/{Mobile/User/UserManagerMobile.cs.meta → Runtime/Internal/Mobile/AccountFeaturesImpl.cs.meta} +1 -1
  50. package/Runtime/Internal/Mobile/Http/LoginSyncResponse.cs +14 -0
  51. package/Runtime/Internal/Mobile/Http/LoginSyncResponse.cs.meta +3 -0
  52. package/Runtime/Internal/Mobile/Http/MacAuthenticationInterceptor.cs +37 -0
  53. package/Runtime/Internal/Mobile/Http/MacAuthenticationInterceptor.cs.meta +3 -0
  54. package/Runtime/Internal/Mobile/Http.meta +3 -0
  55. package/{Mobile.meta → Runtime/Internal/Mobile.meta} +1 -1
  56. package/Runtime/Internal/Standalone/AccessToken/AccessTokenModule.cs +168 -0
  57. package/{Mobile/Editor/XDAccountMobileProcessBuild.cs.meta → Runtime/Internal/Standalone/AccessToken/AccessTokenModule.cs.meta} +1 -1
  58. package/Runtime/Internal/Standalone/AccessToken.meta +8 -0
  59. package/Runtime/Internal/Standalone/AccountCell.cs +143 -0
  60. package/{Mobile/XDGAccountMobile.cs.meta → Runtime/Internal/Standalone/AccountCell.cs.meta} +1 -1
  61. package/Runtime/Internal/Standalone/AccountFeaturesImpl.cs +461 -0
  62. package/Runtime/Internal/Standalone/AccountFeaturesImpl.cs.meta +11 -0
  63. package/Runtime/Internal/Standalone/Auth/AppleAuth.cs +27 -0
  64. package/Runtime/Internal/Standalone/Auth/AppleAuth.cs.meta +11 -0
  65. package/Runtime/Internal/Standalone/Auth/FacebookAuth.cs +27 -0
  66. package/Runtime/Internal/Standalone/Auth/FacebookAuth.cs.meta +11 -0
  67. package/Runtime/Internal/Standalone/Auth/GoogleAuth.cs +27 -0
  68. package/Runtime/Internal/Standalone/Auth/GoogleAuth.cs.meta +11 -0
  69. package/Runtime/Internal/Standalone/Auth/GuestAuth.cs +22 -0
  70. package/Runtime/Internal/Standalone/Auth/GuestAuth.cs.meta +11 -0
  71. package/Runtime/Internal/Standalone/Auth/PhoneAuth.cs +43 -0
  72. package/Runtime/Internal/Standalone/Auth/PhoneAuth.cs.meta +11 -0
  73. package/Runtime/Internal/Standalone/Auth/SteamAuth.cs +90 -0
  74. package/Runtime/Internal/Standalone/Auth/SteamAuth.cs.meta +11 -0
  75. package/Runtime/Internal/Standalone/Auth/TapAuth.cs +72 -0
  76. package/Runtime/Internal/Standalone/Auth/TapAuth.cs.meta +11 -0
  77. package/Runtime/Internal/Standalone/Auth/WebAuth.cs +144 -0
  78. package/Runtime/Internal/Standalone/Auth/WebAuth.cs.meta +11 -0
  79. package/Runtime/Internal/Standalone/Auth.meta +8 -0
  80. package/Runtime/Internal/Standalone/Compliance/XDComplianceCode.cs +15 -0
  81. package/Runtime/Internal/Standalone/Compliance/XDComplianceCode.cs.meta +11 -0
  82. package/Runtime/Internal/Standalone/Compliance.meta +8 -0
  83. package/Runtime/Internal/Standalone/LoginModule/Email/EmailModule.cs +374 -0
  84. package/Runtime/Internal/Standalone/LoginModule/Email/EmailModule.cs.meta +11 -0
  85. package/Runtime/Internal/Standalone/LoginModule/Email.meta +8 -0
  86. package/Runtime/Internal/Standalone/LoginModule/Phone/PhoneModule.cs +245 -0
  87. package/Runtime/Internal/Standalone/LoginModule/Phone/PhoneModule.cs.meta +11 -0
  88. package/Runtime/Internal/Standalone/LoginModule/Phone/PhoneModuleIO.cs +392 -0
  89. package/Runtime/Internal/Standalone/LoginModule/Phone/PhoneModuleIO.cs.meta +11 -0
  90. package/Runtime/Internal/Standalone/LoginModule/Phone.meta +8 -0
  91. package/Runtime/Internal/Standalone/LoginModule.meta +8 -0
  92. package/Runtime/Internal/Standalone/SupportModule/SupportModule.cs +228 -0
  93. package/Runtime/Internal/Standalone/SupportModule/SupportModule.cs.meta +3 -0
  94. package/Runtime/Internal/Standalone/SupportModule/SupportResponse.cs +27 -0
  95. package/Runtime/Internal/Standalone/SupportModule/SupportResponse.cs.meta +3 -0
  96. package/Runtime/Internal/Standalone/SupportModule.meta +3 -0
  97. package/Runtime/Internal/Standalone/Track/AliyunTrack.Login.cs +479 -0
  98. package/Runtime/Internal/Standalone/Track/AliyunTrack.Login.cs.meta +11 -0
  99. package/Runtime/Internal/Standalone/Track.meta +8 -0
  100. package/Runtime/Internal/Standalone/UI/CodeUnbindAlert.cs +156 -0
  101. package/Runtime/Internal/Standalone/UI/CodeUnbindAlert.cs.meta +11 -0
  102. package/Runtime/Internal/Standalone/UI/Email/EmailAlert.cs +295 -0
  103. package/Runtime/Internal/Standalone/UI/Email/EmailAlert.cs.meta +11 -0
  104. package/Runtime/Internal/Standalone/UI/Email.meta +8 -0
  105. package/Runtime/Internal/Standalone/UI/PhoneIO/AreaCodeCell.cs +46 -0
  106. package/Runtime/Internal/Standalone/UI/PhoneIO/AreaCodeCell.cs.meta +11 -0
  107. package/Runtime/Internal/Standalone/UI/PhoneIO/PhoneAlertIO.cs +522 -0
  108. package/Runtime/Internal/Standalone/UI/PhoneIO/PhoneAlertIO.cs.meta +11 -0
  109. package/Runtime/Internal/Standalone/UI/PhoneIO.meta +8 -0
  110. package/Runtime/Internal/Standalone/UI/PhoneVerification/PhoneNumberInputAlert.cs +84 -0
  111. package/Runtime/Internal/Standalone/UI/PhoneVerification/PhoneNumberInputAlert.cs.meta +11 -0
  112. package/Runtime/Internal/Standalone/UI/PhoneVerification/RiskControlAlert.cs +190 -0
  113. package/Runtime/Internal/Standalone/UI/PhoneVerification/RiskControlAlert.cs.meta +11 -0
  114. package/Runtime/Internal/Standalone/UI/PhoneVerification/VerifyCodeInputAlert.cs +164 -0
  115. package/Runtime/Internal/Standalone/UI/PhoneVerification/VerifyCodeInputAlert.cs.meta +11 -0
  116. package/Runtime/Internal/Standalone/UI/PhoneVerification.meta +8 -0
  117. package/Runtime/Internal/Standalone/UI.meta +8 -0
  118. package/Runtime/Internal/Standalone/UserCenterAlert.cs +405 -0
  119. package/Runtime/Internal/Standalone/UserCenterAlert.cs.meta +11 -0
  120. package/Runtime/Internal/Standalone/UserModule.cs +604 -0
  121. package/Runtime/Internal/Standalone/UserModule.cs.meta +11 -0
  122. package/Runtime/Internal/Standalone/WebFunction/AccessTokenWebFunction.cs +47 -0
  123. package/Runtime/Internal/Standalone/WebFunction/AccessTokenWebFunction.cs.meta +3 -0
  124. package/Runtime/Internal/Standalone/WebFunction.meta +3 -0
  125. package/{Mobile/Plugins.meta → Runtime/Internal/Standalone.meta} +1 -1
  126. package/Runtime/Internal/XDGAccountEventHandler.cs +23 -0
  127. package/Runtime/Internal/XDGAccountEventHandler.cs.meta +3 -0
  128. package/Runtime/Internal/XDGAccountInternal.cs +86 -0
  129. package/Runtime/Internal/XDGAccountInternal.cs.meta +11 -0
  130. package/Runtime/Internal.meta +1 -1
  131. package/Runtime/Public/XDGAccount.Deprecated.cs +37 -0
  132. package/Runtime/Public/XDGAccount.Deprecated.cs.meta +11 -0
  133. package/Runtime/Public/XDGAccount.cs +107 -0
  134. package/Runtime/{XDGAccount.cs.meta → Public/XDGAccount.cs.meta} +1 -1
  135. package/Runtime/Public.meta +8 -0
  136. package/Runtime/XD.SDK.Account.asmdef +7 -2
  137. package/Runtime/XD.SDK.Account.asmdef.meta +1 -1
  138. package/Runtime.meta +1 -1
  139. package/package.json +5 -5
  140. package/package.json.meta +2 -2
  141. package/Mobile/Editor/XD.SDK.Account.Mobile.Editor.asmdef +0 -20
  142. package/Mobile/Editor/XD.SDK.Account.Mobile.Editor.asmdef.meta +0 -7
  143. package/Mobile/Editor/XDAccountMobileProcessBuild.cs +0 -20
  144. package/Mobile/Http/XDGAccountHttpConfigMobile.cs +0 -36
  145. package/Mobile/Plugins/Android/com/xd/account/bridge/XDGAccountBridge.java +0 -36
  146. package/Mobile/Plugins/Android/com/xd/account/bridge/XDGLoginServiceUnity.java +0 -16
  147. package/Mobile/Plugins/Android/com/xd/account/bridge/XDGLoginServiceUnityImpl.java +0 -20
  148. package/Mobile/Plugins/Android/com/xd/account/bridge.meta +0 -8
  149. package/Mobile/Plugins/Android/com/xd/account.meta +0 -8
  150. package/Mobile/Plugins/Android/com/xd.meta +0 -8
  151. package/Mobile/Plugins/Android/com.meta +0 -8
  152. package/Mobile/Plugins/Android.meta +0 -8
  153. package/Mobile/Plugins/iOS/XDAccountBridge.m +0 -29
  154. package/Mobile/Plugins/iOS/XDAccountBridge.m.meta +0 -37
  155. package/Mobile/Plugins/iOS/XDGLoginServiceUnity.h +0 -17
  156. package/Mobile/Plugins/iOS/XDGLoginServiceUnity.h.meta +0 -27
  157. package/Mobile/Plugins/iOS/XDGLoginServiceUnity.m +0 -23
  158. package/Mobile/Plugins/iOS/XDGLoginServiceUnity.m.meta +0 -37
  159. package/Mobile/Plugins/iOS.meta +0 -8
  160. package/Mobile/User/UserManagerMobile.cs +0 -45
  161. package/Mobile/User.meta +0 -8
  162. package/Mobile/XD.SDK.Account.Mobile.asmdef +0 -23
  163. package/Mobile/XD.SDK.Account.Mobile.asmdef.meta +0 -7
  164. package/Mobile/XDGAccountMobile.cs +0 -138
  165. package/Mobile/XDGAccountMobileImpl.cs +0 -444
  166. package/Mobile/XDGAccountMobileImpl.cs.meta +0 -11
  167. package/Mobile/XDGTokenManager.cs +0 -116
  168. package/Mobile/XDGTokenManager.cs.meta +0 -11
  169. package/Mobile/XDGUserWrapper.cs +0 -167
  170. package/Mobile/XDGUserWrapper.cs.meta +0 -11
  171. package/Plugins/Android/libs/XDGAccount_6.29.0.aar +0 -0
  172. package/Plugins/Android/libs/XDGAccount_6.29.0.aar.meta +0 -32
  173. package/Plugins/iOS/XDAccountSDK.framework/Headers/TDSGlobalThirdPartyLoginManager.h +0 -47
  174. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGPhoneAuthManager.h +0 -33
  175. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGRoleInfo.h +0 -22
  176. package/README.md +0 -0
  177. package/README.md.meta +0 -7
  178. package/Runtime/Editor/XD.SDK.Account.Editor.asmdef +0 -19
  179. package/Runtime/Editor/XD.SDK.Account.Editor.asmdef.meta +0 -7
  180. package/Runtime/Editor/XDAccountProcessBuild.cs +0 -18
  181. package/Runtime/Editor/XDAccountProcessBuild.cs.meta +0 -11
  182. package/Runtime/Editor.meta +0 -8
  183. package/Runtime/IXDGAccount.cs +0 -44
  184. package/Runtime/IXDGAccount.cs.meta +0 -11
  185. package/Runtime/Internal/Http/IXDAccountHttpConfig.cs +0 -9
  186. package/Runtime/Internal/Http/IXDAccountHttpConfig.cs.meta +0 -11
  187. package/Runtime/Internal/Http/XDAccountHttpConfig.cs +0 -32
  188. package/Runtime/Internal/Http/XDAccountHttpConfig.cs.meta +0 -11
  189. package/Runtime/Internal/Http.meta +0 -8
  190. package/Runtime/Internal/User/IUserManagerPlatformWrapper.cs +0 -7
  191. package/Runtime/Internal/User/IUserManagerPlatformWrapper.cs.meta +0 -11
  192. package/Runtime/Internal/User.meta +0 -8
  193. package/Runtime/UserManager.cs +0 -35
  194. package/Runtime/UserManager.cs.meta +0 -11
  195. package/Runtime/XDGAccessToken.cs +0 -18
  196. package/Runtime/XDGAccessToken.cs.meta +0 -11
  197. package/Runtime/XDGAccount.cs +0 -130
  198. package/Runtime/XDGLoginType.cs +0 -17
  199. package/Runtime/XDGLoginType.cs.meta +0 -11
  200. package/Runtime/XDGRoleInfo.cs +0 -24
  201. package/Runtime/XDGRoleInfo.cs.meta +0 -11
  202. package/Runtime/XDGUser.cs +0 -30
  203. package/Runtime/XDGUser.cs.meta +0 -11
  204. package/Runtime/XDGUserStatusCode.cs +0 -16
  205. package/Runtime/XDGUserStatusCode.cs.meta +0 -11
@@ -1,167 +0,0 @@
1
- using System;
2
- using System.Collections.Generic;
3
- using TapTap.Common;
4
- using UnityEngine;
5
- using System.Collections;
6
- using System.Linq;
7
- using XD.SDK.Account;
8
- using XD.SDK.Account;
9
- using XD.SDK.Common;
10
-
11
- namespace XD.SDK.Account
12
- {
13
- // The user's bound accounts. eg.@[@"TAPTAP",@"GOOGLE",@"FACEBOOK"]
14
- [Serializable]
15
- public class XDGUserMobile : XDGUser
16
- {
17
- // The user's user ID.
18
- public string _userId;
19
-
20
- // The user’s user ID in string.
21
- public string _sub;
22
-
23
- // The user's user name.
24
- public string _name;
25
-
26
- // The user's current loginType.
27
- public string _loginType; //App传来的是字符串,如 TapTap。 通过 GetLoginType() 方法获取枚举
28
-
29
- public string _avatar;
30
-
31
- public string _nickName;
32
-
33
- public List<string> _boundAccounts;
34
-
35
- // The user's token.
36
- public XDGAccessToken _token;
37
-
38
- public XDGUserMobile(string json)
39
- {
40
- Dictionary<string, object> dic = Json.Deserialize(json) as Dictionary<string, object>;
41
- this._userId = SafeDictionary.GetValue<string>(dic, "userId");
42
- this._sub = SafeDictionary.GetValue<string>(dic, "sub");
43
- this._name = SafeDictionary.GetValue<string>(dic, "name");
44
- this._loginType = SafeDictionary.GetValue<string>(dic, "loginType");
45
- this._avatar = SafeDictionary.GetValue<string>(dic, "avatar");
46
- this._nickName = SafeDictionary.GetValue<string>(dic, "nickName");
47
- this._boundAccounts = SafeDictionary.GetValue<List<object>>(dic, "boundAccounts")?.Cast<string>().ToList();
48
- this._token = new XDGAccessTokenMobile(SafeDictionary.GetValue<Dictionary<string, object>>(dic, "token"));
49
- }
50
-
51
- public XDGUserMobile(Dictionary<string, object> dic)
52
- {
53
- this._userId = SafeDictionary.GetValue<string>(dic, "userId");
54
- this._sub = SafeDictionary.GetValue<string>(dic, "sub");
55
- this._name = SafeDictionary.GetValue<string>(dic, "name");
56
- this._loginType = SafeDictionary.GetValue<string>(dic, "loginType");
57
- this._avatar = SafeDictionary.GetValue<string>(dic, "avatar");
58
- this._nickName = SafeDictionary.GetValue<string>(dic, "nickName");
59
- this._boundAccounts = SafeDictionary.GetValue<List<object>>(dic, "boundAccounts")?.Cast<string>().ToList();
60
- this._token = new XDGAccessTokenMobile(SafeDictionary.GetValue<Dictionary<string, object>>(dic, "token"));
61
-
62
- XDGLogger.Debug($"打印UserId: {_userId}");
63
- }
64
-
65
- public XD.SDK.Account.LoginType GetLoginType()
66
- {
67
- var strType = this._loginType.ToLower();
68
- switch (strType)
69
- {
70
- case "taptap":
71
- return XD.SDK.Account.LoginType.TapTap;
72
- case "google":
73
- return XD.SDK.Account.LoginType.Google;
74
- case "facebook":
75
- return XD.SDK.Account.LoginType.Facebook;
76
- case "apple":
77
- return XD.SDK.Account.LoginType.Apple;
78
- case "line":
79
- return XD.SDK.Account.LoginType.LINE;
80
- case "twitter":
81
- return XD.SDK.Account.LoginType.Twitter;
82
- // case "qq":
83
- // return XD.SDK.Account.LoginType.QQ;
84
- // case "twitch":
85
- // return XD.SDK.Account.LoginType.Twitch;
86
- case "steam":
87
- return XD.SDK.Account.LoginType.Steam;
88
- case "guest":
89
- return XD.SDK.Account.LoginType.Guest;
90
- case "phone":
91
- return XD.SDK.Account.LoginType.Phone;
92
- }
93
-
94
- return XD.SDK.Account.LoginType.Default;
95
- }
96
-
97
- public string userId => _userId;
98
- public string name => _name;
99
- public string sub => _sub;
100
- public string loginType => XDGAccount.GetLoginTypeString(getLoginType());
101
- public string avatar => _avatar;
102
- public string nickName => _nickName;
103
- public List<string> boundAccounts => _boundAccounts;
104
- public XDGAccessToken token => _token;
105
- public LoginType getLoginType()
106
- {
107
- return (LoginType)GetLoginType();
108
- }
109
- }
110
-
111
- [Serializable]
112
- public class XDGUserWrapper
113
- {
114
- public XDGUser user;
115
- public XDGError error;
116
-
117
- public XDGUserWrapper(string json)
118
- {
119
- Dictionary<string, object> contentDic = Json.Deserialize(json) as Dictionary<string, object>;
120
- Dictionary<string, object>
121
- userDic = SafeDictionary.GetValue<Dictionary<string, object>>(contentDic, "user");
122
- Dictionary<string, object> errorDic =
123
- SafeDictionary.GetValue<Dictionary<string, object>>(contentDic, "error");
124
-
125
- if (userDic != null)
126
- {
127
- this.user = new XDGUserMobile(userDic);
128
- }
129
-
130
- if (errorDic != null)
131
- {
132
- this.error = new XDGErrorMobile(errorDic);
133
- }
134
- }
135
- }
136
-
137
- [Serializable]
138
- public class XDGAccessTokenMobile : XDGAccessToken
139
- {
140
- // 唯一标志
141
- private string _kid;
142
-
143
- // 认证码类型
144
- private string _tokenType;
145
-
146
- // mac密钥
147
- private string _macKey;
148
-
149
- // mac密钥计算方式
150
- private string _macAlgorithm;
151
-
152
- public XDGAccessTokenMobile(Dictionary<string, object> dic)
153
- {
154
- if (dic == null) return;
155
- this._kid = SafeDictionary.GetValue<string>(dic, "kid");
156
- this._tokenType = SafeDictionary.GetValue<string>(dic, "tokenType");
157
- this._macKey = SafeDictionary.GetValue<string>(dic, "macKey");
158
- this._macAlgorithm = SafeDictionary.GetValue<string>(dic, "macAlgorithm");
159
- }
160
-
161
- public string kid => _kid;
162
- public string tokenType => _tokenType;
163
- public string macKey => _macKey;
164
- public string macAlgorithm => _macAlgorithm;
165
- }
166
-
167
- }
@@ -1,11 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: 66bb689890f974127a5824ad3dc5924f
3
- MonoImporter:
4
- externalObjects: {}
5
- serializedVersion: 2
6
- defaultReferences: []
7
- executionOrder: 0
8
- icon: {instanceID: 0}
9
- userData:
10
- assetBundleName:
11
- assetBundleVariant:
@@ -1,32 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: 9491f21dfa052431480ebc2a287505f5
3
- PluginImporter:
4
- externalObjects: {}
5
- serializedVersion: 2
6
- iconMap: {}
7
- executionOrder: {}
8
- defineConstraints: []
9
- isPreloaded: 0
10
- isOverridable: 0
11
- isExplicitlyReferenced: 0
12
- validateReferences: 1
13
- platformData:
14
- - first:
15
- Android: Android
16
- second:
17
- enabled: 1
18
- settings: {}
19
- - first:
20
- Any:
21
- second:
22
- enabled: 0
23
- settings: {}
24
- - first:
25
- Editor: Editor
26
- second:
27
- enabled: 0
28
- settings:
29
- DefaultValueInitialized: true
30
- userData:
31
- assetBundleName:
32
- assetBundleVariant:
@@ -1,47 +0,0 @@
1
- //
2
- // TDSGlobalThirdPartyLoginManager.h
3
- //
4
- //
5
- // Created by JiangJiahao on 2020/8/19.
6
- // 第三方登录管理
7
-
8
- #import <Foundation/Foundation.h>
9
- #import <XDCommonSDK/XDGEntryType.h>
10
- #import <UIKit/UIKit.h>
11
-
12
- @class XDGUser;
13
- @class TDSGlobalViewControllerBase;
14
- NS_ASSUME_NONNULL_BEGIN
15
-
16
- extern NSString *const TDSG_LOGIN_ERROR_DOMAIN;
17
-
18
- typedef void (^XDGLoginManagerRequestCallback)( XDGUser * _Nullable result,NSError * _Nullable error);
19
-
20
- typedef void(^XDGLoginSyncCallback)(NSDictionary * _Nullable result,NSError * _Nullable error);
21
-
22
- typedef NS_ENUM(NSInteger,TDSLoginErrorCode) {
23
- TDSLoginErrorCodeFail = 0x1002, // fail
24
- TDSLoginErrorCodeCancel = 0x1003, // user cancel
25
- TDSLoginErrorCodeNetworkOffline = 0x1004, // no network
26
- TDSLoginErrorCodeTokenExpired = 0x1005, // fail
27
- };
28
-
29
- @interface TDSGlobalThirdPartyLoginManager : NSObject
30
-
31
- + (void)loginByType:(LoginEntryType)loginType fromViewController:(nullable UIViewController *)viewController handler:(XDGLoginManagerRequestCallback)handler;
32
-
33
- + (void)failHandler:(NSError *)error handler:(XDGLoginManagerRequestCallback)handler;
34
-
35
- + (void)failHandler:(NSError *)error handler:(XDGLoginManagerRequestCallback)handler fromSDKLogin:(BOOL)fromSDKLogin;
36
-
37
- + (void)successHandler:(NSDictionary *)dataDic handler:(XDGLoginManagerRequestCallback)handler loginType:(LoginEntryType)loginType;
38
-
39
- + (void)getUserProfile:(XDGLoginManagerRequestCallback)handler;
40
-
41
- + (void)logout:(BOOL)fromAPI withHandler:(nullable void (^)(void))handler;
42
-
43
- + (void)syncNetConnect:(BOOL)connect syncCallback:(XDGLoginSyncCallback)handle;
44
-
45
- @end
46
-
47
- NS_ASSUME_NONNULL_END
@@ -1,33 +0,0 @@
1
- //
2
- // XDGPhoneAuthManager.h
3
- // XDAccountSDK
4
- //
5
- // Created by Fattycat on 2023/2/11.
6
- //
7
-
8
- #import <Foundation/Foundation.h>
9
- #import <XDAccountSDK/TDSGlobalThirdPartyLoginManager.h>
10
- #import <XDAccountSDK/TDSGlobalThirdPartyLoginHelper.h>
11
- #import <XDCommonSDK/XDGHttpResponse.h>
12
-
13
- NS_ASSUME_NONNULL_BEGIN
14
-
15
- typedef void (^XDGPhoneAuthSMSHanlder)(XDGHttpResponse *_Nullable response);
16
-
17
- @interface XDGPhoneAuthManager : NSObject
18
-
19
- + (XDGPhoneAuthManager *)sharedInstance;
20
-
21
- + (void)startPhoneLoginWithHandler:(XDGLoginManagerRequestCallback)handler fromViewController:viewController successCallback:(TDSGlobalAuthSuccessCalback)successCallback cancelCallback:(TDSGlobalAuthCancelCallback)cancelCallback errorCallback:(TDSGlobalAuthErrorCallback)errorCallback;
22
-
23
- + (void)bindPhoneFromViewController:viewController successCallback:(TDSGlobalAuthSuccessCalback)successCallback cancelCallback:(TDSGlobalAuthCancelCallback)cancelCallback errorCallback:(TDSGlobalAuthErrorCallback)errorCallback;
24
-
25
- + (void)unbindPhone:(NSString *)phoneNumber;
26
-
27
- - (void)sendSMS:(NSString *)phoneNumber verify:(NSString *_Nullable)verify fromSMS:(BOOL)fromSMS;
28
-
29
- - (void)showPhoneLogin:(BOOL)downgrade;
30
-
31
- @end
32
-
33
- NS_ASSUME_NONNULL_END
@@ -1,22 +0,0 @@
1
- //
2
- // XDGRoleInfo.h
3
- // XDAccountSDK
4
- //
5
- // Created by Fattycat on 2024/9/29.
6
- //
7
-
8
- #import <Foundation/Foundation.h>
9
-
10
- NS_ASSUME_NONNULL_BEGIN
11
-
12
- @interface XDGRoleInfo : NSObject
13
-
14
- @property (nonatomic, nullable, copy) NSString *roleId;
15
- @property (nonatomic, nullable, copy) NSString *roleName;
16
- @property (nonatomic, nullable, copy) NSString *serverId;
17
- @property (nonatomic, nullable, copy) NSString *extra;
18
-
19
- - (NSDictionary *)toDictionary;
20
- @end
21
-
22
- NS_ASSUME_NONNULL_END
package/README.md DELETED
File without changes
package/README.md.meta DELETED
@@ -1,7 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: 0bcd50ac8e2f349fa91e40dddb81faff
3
- TextScriptImporter:
4
- externalObjects: {}
5
- userData:
6
- assetBundleName:
7
- assetBundleVariant:
@@ -1,19 +0,0 @@
1
- {
2
- "name": "XD.SDK.Account.Editor",
3
- "references": [
4
- "GUID:616cea76def2d4f059b94440fc8cc03d",
5
- "GUID:0acc523941302664db1f4e527237feb3",
6
- "GUID:27619889b8ba8c24980f49ee34dbb44a"
7
- ],
8
- "includePlatforms": [
9
- "Editor"
10
- ],
11
- "excludePlatforms": [],
12
- "allowUnsafeCode": false,
13
- "overrideReferences": false,
14
- "precompiledReferences": [],
15
- "autoReferenced": true,
16
- "defineConstraints": [],
17
- "versionDefines": [],
18
- "noEngineReferences": false
19
- }
@@ -1,7 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: 3707cefbba3dd43a7901cf420e913481
3
- AssemblyDefinitionImporter:
4
- externalObjects: {}
5
- userData:
6
- assetBundleName:
7
- assetBundleVariant:
@@ -1,18 +0,0 @@
1
- using System;
2
- using TapTap.Common.Editor;
3
- using UnityEditor.Build.Reporting;
4
-
5
- namespace XD.SDK.Account.Editor
6
- {
7
- public class XDAccountProcessBuild : SDKLinkProcessBuild {
8
- public override int callbackOrder => 5;
9
-
10
- public override string LinkPath => "XDSDK/Gen/Account/link.xml";
11
-
12
- public override LinkedAssembly[] LinkedAssemblies => new LinkedAssembly[] {
13
- new LinkedAssembly { Fullname = "XD.SDK.Account" },
14
- };
15
-
16
- public override Func<BuildReport, bool> IsTargetPlatform => (report) => true;
17
- }
18
- }
@@ -1,11 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: 5d05c60017b80487a8f097d8d6eba5da
3
- MonoImporter:
4
- externalObjects: {}
5
- serializedVersion: 2
6
- defaultReferences: []
7
- executionOrder: 0
8
- icon: {instanceID: 0}
9
- userData:
10
- assetBundleName:
11
- assetBundleVariant:
@@ -1,8 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: c534b35c21752465bb2213bd5c12f772
3
- folderAsset: yes
4
- DefaultImporter:
5
- externalObjects: {}
6
- userData:
7
- assetBundleName:
8
- assetBundleVariant:
@@ -1,44 +0,0 @@
1
- using System;
2
- using System.Collections.Generic;
3
- using XD.SDK.Common;
4
- using LoginType = XD.SDK.Account.LoginType;
5
-
6
- namespace XD.SDK.Account{
7
- public interface IXDGAccount
8
- {
9
- void Login(List<LoginType> loginTypes, Action<XDGUser> callback,
10
- Action<XDGError> errorCallback);
11
-
12
- void LoginByType(LoginType loginType, Action<XDGUser> callback,
13
- Action<XDGError> errorCallback);
14
-
15
- /// <summary>
16
- /// 发行在主机(Steam/PS/Nintendo)上的游戏的自动登录接口
17
- /// </summary>
18
- /// <param name="successCallback">该主机的账号注册过心动账号,那么会返回登录成功(第二次登录的时候,如果主机账号没有发生改变,会直接返回登录成功,略过网络请求)</param>
19
- /// <param name="failCallback">该主机的账号未注册过心动账号,那么会返回失败。这个时候需要调用LoginByType登录</param>
20
- /// <param name="errorCallback">网络请求错误或者非主机平台的游戏调用,以及其他错误</param>
21
- void LoginByConsole(Action<XDGUser> successCallback, Action failCallback,
22
- Action<XDGError> errorCallback);
23
-
24
-
25
- void Logout();
26
-
27
- void AddUserStatusChangeCallback(Action<XDGUserStatusCodeType, string> callback);
28
-
29
- void GetUser(Action<XDGUser> callback, Action<XDGError> errorCallback);
30
-
31
- void OpenUserCenter();
32
-
33
- void OpenUnregister();
34
-
35
- //641 FB token
36
- void IsTokenActiveWithType(LoginType loginType, Action<bool> callback);
37
-
38
- //除了 Default 和 Guest
39
- void BindByType(LoginType loginType, Action<bool, XDGError> callback);
40
-
41
- void OpenUserDashboard(XDGRoleInfo roleInfo);
42
-
43
- }
44
- }
@@ -1,11 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: 8ea1514342024f7d9d492a9ba914bcb7
3
- MonoImporter:
4
- externalObjects: {}
5
- serializedVersion: 2
6
- defaultReferences: []
7
- executionOrder: 0
8
- icon: {instanceID: 0}
9
- userData:
10
- assetBundleName:
11
- assetBundleVariant:
@@ -1,9 +0,0 @@
1
- using System.Collections.Generic;
2
- using System.Threading.Tasks;
3
- using System.Net.Http;
4
-
5
- namespace XD.SDK.Account.Internal {
6
- public interface IXDAccountHttpConfig {
7
- Task<Dictionary<string, string>> GetAuthorizationHeaders(HttpRequestMessage request, long timestamp);
8
- }
9
- }
@@ -1,11 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: 75ab08cb48bba41d1af6f0de4856d893
3
- MonoImporter:
4
- externalObjects: {}
5
- serializedVersion: 2
6
- defaultReferences: []
7
- executionOrder: 0
8
- icon: {instanceID: 0}
9
- userData:
10
- assetBundleName:
11
- assetBundleVariant:
@@ -1,32 +0,0 @@
1
- using System;
2
- using System.Linq;
3
- using System.Collections.Generic;
4
- using System.Threading.Tasks;
5
- using System.Net.Http;
6
- using XD.SDK.Common;
7
- using XD.SDK.Common.Internal;
8
- using UnityEngine;
9
-
10
- namespace XD.SDK.Account.Internal {
11
- public class XDAccountHttpConfig {
12
- private static IXDAccountHttpConfig platformWrapper;
13
-
14
- public static void Init() {
15
- var interfaceType = typeof(IXDAccountHttpConfig);
16
- var platformInterfaceType = AppDomain.CurrentDomain.GetAssemblies()
17
- .SelectMany(assembly => assembly.GetTypes())
18
- .FirstOrDefault(clazz => interfaceType.IsAssignableFrom(clazz) && clazz.IsClass);
19
- if (platformInterfaceType != null) {
20
- platformWrapper = Activator.CreateInstance(platformInterfaceType) as IXDAccountHttpConfig;
21
-
22
- XDHttpClientFactory.RegisterHeadersTaskFunc(GetAuthorizationHeaders);
23
- } else {
24
- XDGLogger.Error($"No class implements {interfaceType} Type. Current Platform: {Application.platform}, if you are using Editor, please check if you have installed XDSDK pc module.");
25
- }
26
- }
27
-
28
- public static Task<Dictionary<string, string>> GetAuthorizationHeaders(HttpRequestMessage request, long timestamp) {
29
- return platformWrapper.GetAuthorizationHeaders(request, timestamp);
30
- }
31
- }
32
- }
@@ -1,11 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: 826b8a37798b64a36a9c21566c9c7192
3
- MonoImporter:
4
- externalObjects: {}
5
- serializedVersion: 2
6
- defaultReferences: []
7
- executionOrder: 0
8
- icon: {instanceID: 0}
9
- userData:
10
- assetBundleName:
11
- assetBundleVariant:
@@ -1,8 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: d40702510bc8b4c139675c3290a1eded
3
- folderAsset: yes
4
- DefaultImporter:
5
- externalObjects: {}
6
- userData:
7
- assetBundleName:
8
- assetBundleVariant:
@@ -1,7 +0,0 @@
1
- namespace XD.SDK.Account.Internal
2
- {
3
- public interface IUserManagerPlatformWrapper
4
- {
5
- XDGUser GetCurrentUser();
6
- }
7
- }
@@ -1,11 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: 44830d6b009a4877b9e1ae76f2d40341
3
- MonoImporter:
4
- externalObjects: {}
5
- serializedVersion: 2
6
- defaultReferences: []
7
- executionOrder: 0
8
- icon: {instanceID: 0}
9
- userData:
10
- assetBundleName:
11
- assetBundleVariant:
@@ -1,8 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: ce9cdb82ff6140aaa1f6ff38a58cda76
3
- folderAsset: yes
4
- DefaultImporter:
5
- externalObjects: {}
6
- userData:
7
- assetBundleName:
8
- assetBundleVariant:
@@ -1,35 +0,0 @@
1
- using System;
2
- using System.Linq;
3
- using UnityEngine;
4
- using XD.SDK.Account.Internal;
5
- using XD.SDK.Common;
6
-
7
- namespace XD.SDK.Account
8
- {
9
- public class UserManager
10
- {
11
- private static IUserManagerPlatformWrapper _platformWrapper;
12
-
13
- public static void Init()
14
- {
15
- var interfaceType = typeof(IUserManagerPlatformWrapper);
16
- var platformInterfaceType = AppDomain.CurrentDomain.GetAssemblies()
17
- .SelectMany(assembly => assembly.GetTypes())
18
- .FirstOrDefault(clazz => interfaceType.IsAssignableFrom(clazz) && clazz.IsClass);
19
-
20
- if (platformInterfaceType != null)
21
- {
22
- _platformWrapper = Activator.CreateInstance(platformInterfaceType) as IUserManagerPlatformWrapper;
23
- }
24
- else
25
- {
26
- XDGLogger.Error($"No class implements {interfaceType} Type. Current Platform : {Application.platform}, if you are using Editor, , please check if you have installed XDSDK pc module.");
27
- }
28
- }
29
-
30
- public static XDGUser GetCurrentUser()
31
- {
32
- return _platformWrapper.GetCurrentUser();
33
- }
34
- }
35
- }
@@ -1,11 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: a324bccdf7754263b9974f1b591e6420
3
- MonoImporter:
4
- externalObjects: {}
5
- serializedVersion: 2
6
- defaultReferences: []
7
- executionOrder: 0
8
- icon: {instanceID: 0}
9
- userData:
10
- assetBundleName:
11
- assetBundleVariant:
@@ -1,18 +0,0 @@
1
- namespace XD.SDK.Account
2
- {
3
- public interface XDGAccessToken
4
- {
5
- // 唯一标志
6
- string kid { get; }
7
-
8
- // 认证码类型
9
- string tokenType { get; }
10
-
11
- // mac密钥
12
- string macKey { get; }
13
-
14
- // mac密钥计算方式
15
- string macAlgorithm { get; }
16
-
17
- }
18
- }
@@ -1,11 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: 4851d184199c45ecb008cb79693a3f45
3
- MonoImporter:
4
- externalObjects: {}
5
- serializedVersion: 2
6
- defaultReferences: []
7
- executionOrder: 0
8
- icon: {instanceID: 0}
9
- userData:
10
- assetBundleName:
11
- assetBundleVariant: