com.xd.sdk.account 0.0.1 → 0.0.11-alpha

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 (191) 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/XDGSupport_7.0.0.aar +0 -0
  4. package/Plugins/Android/libs/{XDGAccount_6.21.1.aar.meta → XDGSupport_7.0.0.aar.meta} +2 -2
  5. package/Plugins/Android/libs.meta +1 -1
  6. package/Plugins/Android.meta +1 -1
  7. package/Plugins/iOS/XDAccountSDK.framework/Headers/TDSGlobalThirdPartyLoginHelper.h +4 -9
  8. package/Plugins/iOS/XDAccountSDK.framework/Headers/TDSGlobalThirdPartyLoginHelper.h.meta +1 -1
  9. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDAccountSDK-Swift.h +329 -0
  10. package/Plugins/iOS/XDAccountSDK.framework/Headers/{TDSGlobalThirdPartyLoginManager.h.meta → XDAccountSDK-Swift.h.meta} +1 -1
  11. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDAccountSDK.h +2 -2
  12. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDAccountSDK.h.meta +1 -1
  13. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGAccount.h +36 -44
  14. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGAccount.h.meta +1 -1
  15. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGAccountDefines.h +43 -0
  16. package/Plugins/iOS/XDAccountSDK.framework/Headers/{XDGPhoneAuthManager.h.meta → XDGAccountDefines.h.meta} +1 -1
  17. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGAccountVersion.h +3 -2
  18. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGAccountVersion.h.meta +1 -1
  19. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGLogger+Account.h +3 -0
  20. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGLogger+Account.h.meta +1 -1
  21. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGLoginEntriesConfig.h.meta +1 -1
  22. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGLoginService.h.meta +1 -1
  23. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGTapLoginPermissionDialog.h.meta +1 -1
  24. package/Plugins/iOS/XDAccountSDK.framework/Headers.meta +1 -1
  25. package/Plugins/iOS/XDAccountSDK.framework/Info.plist +0 -0
  26. package/Plugins/iOS/XDAccountSDK.framework/Info.plist.meta +1 -1
  27. package/Plugins/iOS/XDAccountSDK.framework/Modules/XDAccountSDK.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
  28. package/Plugins/iOS/XDAccountSDK.framework/Modules/XDAccountSDK.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo.meta +7 -0
  29. package/{Mobile/Http.meta → Plugins/iOS/XDAccountSDK.framework/Modules/XDAccountSDK.swiftmodule/Project.meta} +1 -1
  30. package/Plugins/iOS/XDAccountSDK.framework/Modules/XDAccountSDK.swiftmodule/arm64-apple-ios.abi.json +9 -0
  31. package/Plugins/iOS/XDAccountSDK.framework/Modules/XDAccountSDK.swiftmodule/arm64-apple-ios.abi.json.meta +7 -0
  32. package/Plugins/iOS/XDAccountSDK.framework/Modules/XDAccountSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  33. package/Plugins/iOS/XDAccountSDK.framework/Modules/XDAccountSDK.swiftmodule/arm64-apple-ios.swiftdoc.meta +7 -0
  34. package/Plugins/iOS/XDAccountSDK.framework/Modules/XDAccountSDK.swiftmodule/arm64-apple-ios.swiftmodule +0 -0
  35. package/Plugins/iOS/XDAccountSDK.framework/Modules/XDAccountSDK.swiftmodule/arm64-apple-ios.swiftmodule.meta +7 -0
  36. package/{Mobile/Editor.meta → Plugins/iOS/XDAccountSDK.framework/Modules/XDAccountSDK.swiftmodule.meta} +1 -1
  37. package/Plugins/iOS/XDAccountSDK.framework/Modules/module.modulemap.meta +1 -1
  38. package/Plugins/iOS/XDAccountSDK.framework/Modules.meta +1 -1
  39. package/Plugins/iOS/XDAccountSDK.framework/XDAccountSDK +0 -0
  40. package/Plugins/iOS/XDAccountSDK.framework/XDAccountSDK.meta +1 -1
  41. package/Plugins/iOS/XDAccountSDK.framework.meta +57 -4
  42. package/Plugins/iOS.meta +1 -1
  43. package/Plugins.meta +1 -1
  44. package/Runtime/Internal/IXDGAccount.Extended.cs +11 -0
  45. package/{Mobile/Http/XDGAccountHttpConfigMobile.cs.meta → Runtime/Internal/IXDGAccount.Extended.cs.meta} +1 -1
  46. package/Runtime/Internal/Mobile/AccountFeaturesImpl.cs +341 -0
  47. package/{Mobile/XDGAccountMobile.cs.meta → Runtime/Internal/Mobile/AccountFeaturesImpl.cs.meta} +1 -1
  48. package/Runtime/Internal/Mobile/Http/LoginSyncResponse.cs +14 -0
  49. package/Runtime/Internal/Mobile/Http/LoginSyncResponse.cs.meta +3 -0
  50. package/Runtime/Internal/Mobile/Http/MacAuthenticationInterceptor.cs +37 -0
  51. package/Runtime/Internal/Mobile/Http/MacAuthenticationInterceptor.cs.meta +3 -0
  52. package/Runtime/Internal/Mobile/Http.meta +3 -0
  53. package/{Mobile.meta → Runtime/Internal/Mobile.meta} +1 -1
  54. package/Runtime/Internal/Standalone/AccessToken/AccessTokenModule.cs +168 -0
  55. package/{Mobile/Editor/XDAccountMobileProcessBuild.cs.meta → Runtime/Internal/Standalone/AccessToken/AccessTokenModule.cs.meta} +1 -1
  56. package/Runtime/Internal/Standalone/AccessToken.meta +8 -0
  57. package/Runtime/Internal/Standalone/AccountCell.cs +143 -0
  58. package/{Mobile/XDGAccountMobileImpl.cs.meta → Runtime/Internal/Standalone/AccountCell.cs.meta} +1 -1
  59. package/Runtime/Internal/Standalone/AccountFeaturesImpl.cs +452 -0
  60. package/Runtime/Internal/Standalone/AccountFeaturesImpl.cs.meta +11 -0
  61. package/Runtime/Internal/Standalone/Auth/AppleAuth.cs +27 -0
  62. package/Runtime/Internal/Standalone/Auth/AppleAuth.cs.meta +11 -0
  63. package/Runtime/Internal/Standalone/Auth/FacebookAuth.cs +27 -0
  64. package/Runtime/Internal/Standalone/Auth/FacebookAuth.cs.meta +11 -0
  65. package/Runtime/Internal/Standalone/Auth/GoogleAuth.cs +27 -0
  66. package/Runtime/Internal/Standalone/Auth/GoogleAuth.cs.meta +11 -0
  67. package/Runtime/Internal/Standalone/Auth/GuestAuth.cs +22 -0
  68. package/Runtime/Internal/Standalone/Auth/GuestAuth.cs.meta +11 -0
  69. package/Runtime/Internal/Standalone/Auth/PhoneAuth.cs +43 -0
  70. package/Runtime/Internal/Standalone/Auth/PhoneAuth.cs.meta +11 -0
  71. package/Runtime/Internal/Standalone/Auth/SteamAuth.cs +90 -0
  72. package/Runtime/Internal/Standalone/Auth/SteamAuth.cs.meta +11 -0
  73. package/Runtime/Internal/Standalone/Auth/TapAuth.cs +72 -0
  74. package/Runtime/Internal/Standalone/Auth/TapAuth.cs.meta +11 -0
  75. package/Runtime/Internal/Standalone/Auth/WebAuth.cs +144 -0
  76. package/Runtime/Internal/Standalone/Auth/WebAuth.cs.meta +11 -0
  77. package/Runtime/Internal/Standalone/Auth.meta +8 -0
  78. package/Runtime/Internal/Standalone/LoginModule/Email/EmailModule.cs +374 -0
  79. package/Runtime/Internal/Standalone/LoginModule/Email/EmailModule.cs.meta +11 -0
  80. package/Runtime/Internal/Standalone/LoginModule/Email.meta +8 -0
  81. package/Runtime/Internal/Standalone/LoginModule/Phone/PhoneModule.cs +245 -0
  82. package/Runtime/Internal/Standalone/LoginModule/Phone/PhoneModule.cs.meta +11 -0
  83. package/Runtime/Internal/Standalone/LoginModule/Phone/PhoneModuleIO.cs +392 -0
  84. package/Runtime/Internal/Standalone/LoginModule/Phone/PhoneModuleIO.cs.meta +11 -0
  85. package/Runtime/Internal/Standalone/LoginModule/Phone.meta +8 -0
  86. package/Runtime/Internal/Standalone/LoginModule.meta +8 -0
  87. package/Runtime/Internal/Standalone/SupportModule/SupportModule.cs +200 -0
  88. package/Runtime/Internal/Standalone/SupportModule/SupportModule.cs.meta +3 -0
  89. package/Runtime/Internal/Standalone/SupportModule/SupportResponse.cs +27 -0
  90. package/Runtime/Internal/Standalone/SupportModule/SupportResponse.cs.meta +3 -0
  91. package/Runtime/Internal/Standalone/SupportModule.meta +3 -0
  92. package/Runtime/Internal/Standalone/Track/AliyunTrack.Login.cs +479 -0
  93. package/Runtime/Internal/Standalone/Track/AliyunTrack.Login.cs.meta +11 -0
  94. package/Runtime/Internal/Standalone/Track.meta +8 -0
  95. package/Runtime/Internal/Standalone/UI/CodeUnbindAlert.cs +156 -0
  96. package/Runtime/Internal/Standalone/UI/CodeUnbindAlert.cs.meta +11 -0
  97. package/Runtime/Internal/Standalone/UI/Email/EmailAlert.cs +295 -0
  98. package/Runtime/Internal/Standalone/UI/Email/EmailAlert.cs.meta +11 -0
  99. package/Runtime/Internal/Standalone/UI/Email.meta +8 -0
  100. package/Runtime/Internal/Standalone/UI/PhoneIO/AreaCodeCell.cs +46 -0
  101. package/Runtime/Internal/Standalone/UI/PhoneIO/AreaCodeCell.cs.meta +11 -0
  102. package/Runtime/Internal/Standalone/UI/PhoneIO/PhoneAlertIO.cs +522 -0
  103. package/Runtime/Internal/Standalone/UI/PhoneIO/PhoneAlertIO.cs.meta +11 -0
  104. package/Runtime/Internal/Standalone/UI/PhoneIO.meta +8 -0
  105. package/Runtime/Internal/Standalone/UI/PhoneVerification/PhoneNumberInputAlert.cs +84 -0
  106. package/Runtime/Internal/Standalone/UI/PhoneVerification/PhoneNumberInputAlert.cs.meta +11 -0
  107. package/Runtime/Internal/Standalone/UI/PhoneVerification/RiskControlAlert.cs +190 -0
  108. package/Runtime/Internal/Standalone/UI/PhoneVerification/RiskControlAlert.cs.meta +11 -0
  109. package/Runtime/Internal/Standalone/UI/PhoneVerification/VerifyCodeInputAlert.cs +164 -0
  110. package/Runtime/Internal/Standalone/UI/PhoneVerification/VerifyCodeInputAlert.cs.meta +11 -0
  111. package/Runtime/Internal/Standalone/UI/PhoneVerification.meta +8 -0
  112. package/Runtime/Internal/Standalone/UI.meta +8 -0
  113. package/Runtime/Internal/Standalone/UserCenterAlert.cs +405 -0
  114. package/Runtime/Internal/Standalone/UserCenterAlert.cs.meta +11 -0
  115. package/Runtime/Internal/Standalone/UserModule.cs +597 -0
  116. package/Runtime/Internal/Standalone/UserModule.cs.meta +11 -0
  117. package/Runtime/Internal/Standalone/WebFunction/AccessTokenWebFunction.cs +47 -0
  118. package/Runtime/Internal/Standalone/WebFunction/AccessTokenWebFunction.cs.meta +3 -0
  119. package/Runtime/Internal/Standalone/WebFunction.meta +3 -0
  120. package/{Mobile/Plugins.meta → Runtime/Internal/Standalone.meta} +1 -1
  121. package/Runtime/Internal/XDGAccountEventHandler.cs +21 -0
  122. package/Runtime/Internal/XDGAccountEventHandler.cs.meta +3 -0
  123. package/Runtime/Internal/XDGAccountInternal.cs +87 -0
  124. package/Runtime/Internal/XDGAccountInternal.cs.meta +11 -0
  125. package/Runtime/Internal.meta +1 -1
  126. package/Runtime/Public/XDGAccount.Deprecated.cs +37 -0
  127. package/Runtime/Public/XDGAccount.Deprecated.cs.meta +11 -0
  128. package/Runtime/Public/XDGAccount.cs +107 -0
  129. package/Runtime/Public/XDGAccount.cs.meta +11 -0
  130. package/Runtime/Public.meta +8 -0
  131. package/Runtime/XD.SDK.Account.asmdef +7 -2
  132. package/Runtime/XD.SDK.Account.asmdef.meta +1 -1
  133. package/Runtime.meta +7 -2
  134. package/package.json +5 -5
  135. package/package.json.meta +2 -2
  136. package/Mobile/Editor/XD.SDK.Account.Mobile.Editor.asmdef +0 -20
  137. package/Mobile/Editor/XD.SDK.Account.Mobile.Editor.asmdef.meta +0 -7
  138. package/Mobile/Editor/XDAccountMobileProcessBuild.cs +0 -20
  139. package/Mobile/Http/XDGAccountHttpConfigMobile.cs +0 -36
  140. package/Mobile/Plugins/Android/com/xd/account/bridge/XDGAccountBridge.java +0 -15
  141. package/Mobile/Plugins/Android/com/xd/account/bridge.meta +0 -8
  142. package/Mobile/Plugins/Android/com/xd/account.meta +0 -8
  143. package/Mobile/Plugins/Android/com/xd.meta +0 -8
  144. package/Mobile/Plugins/Android/com.meta +0 -8
  145. package/Mobile/Plugins/Android.meta +0 -8
  146. package/Mobile/Plugins/iOS/XDAccountBridge.m +0 -26
  147. package/Mobile/Plugins/iOS/XDAccountBridge.m.meta +0 -37
  148. package/Mobile/Plugins/iOS.meta +0 -8
  149. package/Mobile/User/UserManagerMobile.cs +0 -45
  150. package/Mobile/User/UserManagerMobile.cs.meta +0 -3
  151. package/Mobile/User.meta +0 -3
  152. package/Mobile/XD.SDK.Account.Mobile.asmdef +0 -23
  153. package/Mobile/XD.SDK.Account.Mobile.asmdef.meta +0 -7
  154. package/Mobile/XDGAccountMobile.cs +0 -132
  155. package/Mobile/XDGAccountMobileImpl.cs +0 -421
  156. package/Mobile/XDGTokenManager.cs +0 -116
  157. package/Mobile/XDGTokenManager.cs.meta +0 -3
  158. package/Mobile/XDGUserWrapper.cs +0 -167
  159. package/Mobile/XDGUserWrapper.cs.meta +0 -11
  160. package/Plugins/Android/libs/XDGAccount_6.21.1.aar +0 -0
  161. package/Plugins/iOS/XDAccountSDK.framework/Headers/TDSGlobalThirdPartyLoginManager.h +0 -47
  162. package/Plugins/iOS/XDAccountSDK.framework/Headers/XDGPhoneAuthManager.h +0 -33
  163. package/README.md +0 -0
  164. package/README.md.meta +0 -7
  165. package/Runtime/Editor/XD.SDK.Account.Editor.asmdef +0 -19
  166. package/Runtime/Editor/XD.SDK.Account.Editor.asmdef.meta +0 -7
  167. package/Runtime/Editor/XDAccountProcessBuild.cs +0 -18
  168. package/Runtime/Editor/XDAccountProcessBuild.cs.meta +0 -11
  169. package/Runtime/Editor.meta +0 -8
  170. package/Runtime/IXDGAccount.cs +0 -42
  171. package/Runtime/IXDGAccount.cs.meta +0 -3
  172. package/Runtime/Internal/Http/IXDAccountHttpConfig.cs +0 -9
  173. package/Runtime/Internal/Http/IXDAccountHttpConfig.cs.meta +0 -11
  174. package/Runtime/Internal/Http/XDAccountHttpConfig.cs +0 -32
  175. package/Runtime/Internal/Http/XDAccountHttpConfig.cs.meta +0 -11
  176. package/Runtime/Internal/Http.meta +0 -8
  177. package/Runtime/Internal/User/IUserManagerPlatformWrapper.cs +0 -7
  178. package/Runtime/Internal/User/IUserManagerPlatformWrapper.cs.meta +0 -3
  179. package/Runtime/Internal/User.meta +0 -3
  180. package/Runtime/UserManager.cs +0 -35
  181. package/Runtime/UserManager.cs.meta +0 -3
  182. package/Runtime/XDGAccessToken.cs +0 -18
  183. package/Runtime/XDGAccessToken.cs.meta +0 -3
  184. package/Runtime/XDGAccount.cs +0 -123
  185. package/Runtime/XDGAccount.cs.meta +0 -3
  186. package/Runtime/XDGLoginType.cs +0 -28
  187. package/Runtime/XDGLoginType.cs.meta +0 -3
  188. package/Runtime/XDGUser.cs +0 -30
  189. package/Runtime/XDGUser.cs.meta +0 -3
  190. package/Runtime/XDGUserStatusCode.cs +0 -16
  191. package/Runtime/XDGUserStatusCode.cs.meta +0 -3
@@ -1,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: 3ac66aa6bd48f49b0b20e06dae06f827
2
+ guid: faced476f9674d77b29f163ebfae261d
3
3
  folderAsset: yes
4
4
  DefaultImporter:
5
5
  externalObjects: {}
@@ -1,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: 6a13a2439550e455ab66910eca8a2d09
2
+ guid: 702a082eaf49473f85fa383b6986d915
3
3
  DefaultImporter:
4
4
  externalObjects: {}
5
5
  userData:
@@ -0,0 +1,7 @@
1
+ fileFormatVersion: 2
2
+ guid: e9d7db59294d4cc5b203f0bd29ebb026
3
+ DefaultImporter:
4
+ externalObjects: {}
5
+ userData:
6
+ assetBundleName:
7
+ assetBundleVariant:
@@ -1,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: 5e058405fc5734ba4849a3614da3a161
2
+ guid: d5481a5f1dbe4801aa2b6a6f46f80cad
3
3
  folderAsset: yes
4
4
  DefaultImporter:
5
5
  externalObjects: {}
@@ -0,0 +1,9 @@
1
+ {
2
+ "ABIRoot": {
3
+ "kind": "Root",
4
+ "name": "NO_MODULE",
5
+ "printedName": "NO_MODULE",
6
+ "json_format_version": 8
7
+ },
8
+ "ConstValues": []
9
+ }
@@ -0,0 +1,7 @@
1
+ fileFormatVersion: 2
2
+ guid: 5dce830275654b078b58aafbd4107e92
3
+ DefaultImporter:
4
+ externalObjects: {}
5
+ userData:
6
+ assetBundleName:
7
+ assetBundleVariant:
@@ -0,0 +1,7 @@
1
+ fileFormatVersion: 2
2
+ guid: 4a3d4889ca6f4d3da31537380b0382a6
3
+ DefaultImporter:
4
+ externalObjects: {}
5
+ userData:
6
+ assetBundleName:
7
+ assetBundleVariant:
@@ -0,0 +1,7 @@
1
+ fileFormatVersion: 2
2
+ guid: 116a07f7d0814985a802d7735ca9aa26
3
+ DefaultImporter:
4
+ externalObjects: {}
5
+ userData:
6
+ assetBundleName:
7
+ assetBundleVariant:
@@ -1,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: ae4b4cc27e35c4030a2c713e217de54e
2
+ guid: d5254b7b95c64299bbc72599ce285d65
3
3
  folderAsset: yes
4
4
  DefaultImporter:
5
5
  externalObjects: {}
@@ -1,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: a120d2dcbb0d74178a545ca273bb0ba2
2
+ guid: c1add893ff47489083a1546cc46c018f
3
3
  DefaultImporter:
4
4
  externalObjects: {}
5
5
  userData:
@@ -1,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: 3ccc53369a2174f6da6eeb79c7b27991
2
+ guid: c50db11fe03b41df9c3dd4144151b3f2
3
3
  folderAsset: yes
4
4
  DefaultImporter:
5
5
  externalObjects: {}
@@ -1,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: cf552a32a65a84937bc2319a694ee867
2
+ guid: e1b38850fcea4d168e30f9f6e52b8e82
3
3
  DefaultImporter:
4
4
  externalObjects: {}
5
5
  userData:
@@ -1,6 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: aa2c9c4a67fa44bc1862ebd1f8c700c4
3
- folderAsset: yes
2
+ guid: 09e48b6e2e314ff5b645259afc9bedec
4
3
  PluginImporter:
5
4
  externalObjects: {}
6
5
  serializedVersion: 2
@@ -8,21 +7,75 @@ PluginImporter:
8
7
  executionOrder: {}
9
8
  defineConstraints: []
10
9
  isPreloaded: 0
11
- isOverridable: 0
10
+ isOverridable: 1
12
11
  isExplicitlyReferenced: 0
13
12
  validateReferences: 1
14
13
  platformData:
14
+ - first:
15
+ : Any
16
+ second:
17
+ enabled: 0
18
+ settings:
19
+ Exclude Android: 1
20
+ Exclude Editor: 1
21
+ Exclude Linux64: 1
22
+ Exclude OSXUniversal: 1
23
+ Exclude WebGL: 1
24
+ Exclude Win: 1
25
+ Exclude Win64: 1
26
+ Exclude iOS: 0
27
+ - first:
28
+ Android: Android
29
+ second:
30
+ enabled: 0
31
+ settings:
32
+ CPU: ARMv7
15
33
  - first:
16
34
  Any:
17
35
  second:
18
- enabled: 1
36
+ enabled: 0
19
37
  settings: {}
20
38
  - first:
21
39
  Editor: Editor
22
40
  second:
23
41
  enabled: 0
24
42
  settings:
43
+ CPU: AnyCPU
25
44
  DefaultValueInitialized: true
45
+ OS: AnyOS
46
+ - first:
47
+ Standalone: Linux64
48
+ second:
49
+ enabled: 0
50
+ settings:
51
+ CPU: None
52
+ - first:
53
+ Standalone: OSXUniversal
54
+ second:
55
+ enabled: 0
56
+ settings:
57
+ CPU: None
58
+ - first:
59
+ Standalone: Win
60
+ second:
61
+ enabled: 0
62
+ settings:
63
+ CPU: None
64
+ - first:
65
+ Standalone: Win64
66
+ second:
67
+ enabled: 0
68
+ settings:
69
+ CPU: None
70
+ - first:
71
+ iPhone: iOS
72
+ second:
73
+ enabled: 1
74
+ settings:
75
+ AddToEmbeddedBinaries: true
76
+ CPU: AnyCPU
77
+ CompileFlags:
78
+ FrameworkDependencies:
26
79
  userData:
27
80
  assetBundleName:
28
81
  assetBundleVariant:
package/Plugins/iOS.meta CHANGED
@@ -1,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: 726d804c3a8864751833ecaddfcca99d
2
+ guid: 282408b166f4485f9b87cffde0ecd5da
3
3
  folderAsset: yes
4
4
  DefaultImporter:
5
5
  externalObjects: {}
package/Plugins.meta CHANGED
@@ -1,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: 9feaa06939a844b66b6abc373c121767
2
+ guid: 88231a3562444bf29a33c3cc0ed69efb
3
3
  folderAsset: yes
4
4
  DefaultImporter:
5
5
  externalObjects: {}
@@ -0,0 +1,11 @@
1
+ using System.Collections.Generic;
2
+ using System.Net.Http;
3
+ using System.Threading.Tasks;
4
+
5
+ namespace XD.SDK.Account
6
+ {
7
+ interface IXDGAccountExtended : IXDGAccount
8
+ {
9
+ Task<Dictionary<string, string>> GetRequestAuthorizationHeader(HttpRequestMessage request, long timestamp);
10
+ }
11
+ }
@@ -1,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: ff0780c8218434a908fe4b7e3097cb2d
2
+ guid: 0f24cc2d20a54204a089811a5abb3220
3
3
  MonoImporter:
4
4
  externalObjects: {}
5
5
  serializedVersion: 2
@@ -0,0 +1,341 @@
1
+ #if UNITY_ANDROID || UNITY_IOS
2
+ using System;
3
+ using System.Collections.Generic;
4
+ using System.Net.Http;
5
+ using System.Runtime.InteropServices;
6
+ using System.Threading.Tasks;
7
+ using Newtonsoft.Json;
8
+ using UnityEngine;
9
+ using XD.SDK.Account.Internal.Http;
10
+ using XD.SDK.Common;
11
+ using XD.SDK.Common.Internal;
12
+ using XD.SDK.Common.Internal.Events;
13
+ using XD.SDK.Common.Internal.Http;
14
+ using XD.SDK.Common.Internal.Mobile;
15
+ using XD.SDK.Common.Internal.Mobile.Bridge;
16
+
17
+ namespace XD.SDK.Account.Internal.Mobile
18
+ {
19
+ public class AccountFeaturesImpl : IXDGAccountExtended
20
+ {
21
+ private static AccountFeaturesImpl _instance;
22
+
23
+ private static readonly object LockObj = new object();
24
+
25
+ private const string LoginSynUrl = "/api/login/v1/syn";
26
+
27
+ private readonly Lazy<IHttpClient> defaultClient = new Lazy<IHttpClient>(() =>
28
+ XDHttpClientFactory.GetClient(nameof(AccountFeaturesImpl),
29
+ () =>
30
+ {
31
+ return XDHttpClientFactory.CreateClient(XDGHost.CreateBaseHost(XDGCommonInternal.IsCn()), builder =>
32
+ {
33
+ builder
34
+ .Timeout(TimeSpan.FromSeconds(10))
35
+ .WithLogging()
36
+ .AddInterceptor(new CommonParamsInterceptor())
37
+ .AddInterceptor(new UrlBuildInterceptor())
38
+ .AddInterceptor(new MacAuthenticationInterceptor())
39
+ .Build();
40
+ });
41
+ })
42
+ );
43
+
44
+ private IHttpClient HttpClient => defaultClient.Value;
45
+
46
+ public static AccountFeaturesImpl Instance
47
+ {
48
+ get
49
+ {
50
+ if (_instance == null)
51
+ {
52
+ lock (LockObj)
53
+ {
54
+ if (_instance == null)
55
+ {
56
+ _instance = new AccountFeaturesImpl();
57
+ }
58
+ }
59
+ }
60
+
61
+ return _instance;
62
+ }
63
+ }
64
+
65
+
66
+ private AccountFeaturesImpl()
67
+ {
68
+ EngineBridge.GetInstance()
69
+ .Register(BridgeConstants.Account.SERVICE_NAME, BridgeConstants.Account.SERVICE_IMPL);
70
+ }
71
+
72
+ public void AddUserStatusChangeCallback(Action<XDGUserStatusCodeType, string> callback)
73
+ {
74
+ var command = new Command.Builder()
75
+ .Service(BridgeConstants.Account.BRIDGE_NAME)
76
+ .Method("addUserStatusChangeCallback")
77
+ .Callback(true)
78
+ .OnceTime(false)
79
+ .CommandBuilder();
80
+ EngineBridge.GetInstance().CallHandler(command, async (result) =>
81
+ {
82
+ if (!XDGTool.CheckResultSuccess(result))
83
+ {
84
+ return;
85
+ }
86
+
87
+ var dic = XDGJson.Deserialize(result.content) as Dictionary<string, object>;
88
+ var code = XDDictionary.GetValue<int>(dic, "code");
89
+ var message = XDDictionary.GetValue<string>(dic, "message");
90
+ callback((XDGUserStatusCodeType)code, message);
91
+ });
92
+ }
93
+
94
+ public void LoginByType(LoginType loginType, Action<XDGUser> callback, Action<XDGError> errorCallback)
95
+ {
96
+ var command = new Command.Builder()
97
+ .Service(BridgeConstants.Account.BRIDGE_NAME)
98
+ .Method("loginByType")
99
+ .Args("loginType", loginType.FormatString()) //和app交互用的是字符串,如TapTap
100
+ .Callback(true)
101
+ .OnceTime(true)
102
+ .CommandBuilder();
103
+
104
+ EngineBridge.GetInstance().CallHandler(command, async result =>
105
+ {
106
+ var xdgError = result.Parse2XDGError();
107
+ if (xdgError != null)
108
+ {
109
+ errorCallback(xdgError);
110
+ return;
111
+ }
112
+
113
+ var contentDic = XDGJson.Deserialize(result.content) as Dictionary<string, object>;
114
+ var userDic = XDDictionary.GetValue<Dictionary<string, object>>(contentDic, "user");
115
+ if (userDic != null)
116
+ {
117
+ var user = new XDGUser(userDic);
118
+ await SyncTdsUser(user);
119
+ if (loginType == LoginType.Default)
120
+ {
121
+ RefreshFacebookToken();
122
+ }
123
+ else if (loginType == LoginType.Facebook)
124
+ {
125
+ XDGEventBus.Publish(XDGEvents.TdsSDKRefreshFacebookTime);
126
+ }
127
+ callback(user);
128
+ return;
129
+ }
130
+
131
+ errorCallback(new XDGError(ResponseCode.Common.Failed, "user is null"));
132
+ });
133
+ }
134
+
135
+ public void LoginByConsole(Action<XDGUser> successCallback, Action failCallback, Action<XDGError> errorCallback)
136
+ {
137
+ errorCallback(new XDGError(ResponseCode.Common.UnavailableService, "该平台不支持主机登录"));
138
+ Debug.LogError($"该平台:{Application.platform}不支持主机登录");
139
+ }
140
+
141
+ public void Logout()
142
+ {
143
+ var command = new Command.Builder()
144
+ .Service(BridgeConstants.Account.BRIDGE_NAME)
145
+ .Method("logout")
146
+ .Callback(false)
147
+ .OnceTime(true)
148
+ .CommandBuilder();
149
+ EngineBridge.GetInstance().CallHandler(command);
150
+ }
151
+
152
+ public XDGUser GetCurrentUser()
153
+ {
154
+ XDGUser resultUser = null;
155
+ string currentUserString = null;
156
+ #if UNITY_ANDROID
157
+ using (var accountBridgeClass = new AndroidJavaClass(BridgeConstants.Account.SERVICE_IMPL))
158
+ {
159
+ currentUserString = accountBridgeClass.CallStatic<string>("getCurrentUser");
160
+ }
161
+ #elif UNITY_IOS
162
+ IntPtr ptr = XDAccountBridgeGetUser();
163
+ currentUserString = Marshal.PtrToStringAnsi(ptr);
164
+ #endif
165
+ if (!string.IsNullOrEmpty(currentUserString))
166
+ {
167
+ try
168
+ {
169
+ resultUser = new XDGUser(currentUserString);
170
+ }
171
+ catch (Exception e)
172
+ {
173
+ XDGLogger.Warn("convert current user error" + e.Message);
174
+ }
175
+ }
176
+
177
+ return resultUser;
178
+ }
179
+
180
+ #if UNITY_IOS
181
+ [DllImport("__Internal")]
182
+ private static extern IntPtr XDAccountBridgeGetUser();
183
+ #endif
184
+
185
+ public void OpenCustomerService(XDGRoleInfo roleInfo, string path, Dictionary<string, object> paramsMap)
186
+ {
187
+ var command = new Command.Builder()
188
+ .Service(BridgeConstants.Account.BRIDGE_NAME)
189
+ .Method("openCustomerService")
190
+ .Args(XDUtility.BridgeArgToDictionary("openCustomerService", roleInfo))
191
+ .Args("path", path)
192
+ .Args("params", paramsMap)
193
+ .Callback(false)
194
+ .OnceTime(true)
195
+ .CommandBuilder();
196
+ EngineBridge.GetInstance().CallHandler(command);
197
+ }
198
+
199
+ public void OpenUserCenter()
200
+ {
201
+ var command = new Command.Builder()
202
+ .Service(BridgeConstants.Account.BRIDGE_NAME)
203
+ .Method("openUserCenter")
204
+ .Callback(false)
205
+ .OnceTime(true)
206
+ .CommandBuilder();
207
+ EngineBridge.GetInstance().CallHandler(command);
208
+ }
209
+
210
+ public void OpenUserDashboard(XDGRoleInfo roleInfo)
211
+ {
212
+ var command = new Command.Builder()
213
+ .Service(BridgeConstants.Account.BRIDGE_NAME)
214
+ .Method("openUserDashboard")
215
+ .Args(XDUtility.BridgeArgToDictionary("openUserDashboard", roleInfo))
216
+ .Callback(false)
217
+ .OnceTime(true)
218
+ .CommandBuilder();
219
+ EngineBridge.GetInstance().CallHandler(command);
220
+ }
221
+
222
+ public void OpenAccountDeletion()
223
+ {
224
+ var command = new Command.Builder()
225
+ .Service(BridgeConstants.Account.BRIDGE_NAME)
226
+ .Method("openAccountDeletion")
227
+ .Callback(false)
228
+ .OnceTime(true)
229
+ .CommandBuilder();
230
+ EngineBridge.GetInstance().CallHandler(command);
231
+ }
232
+
233
+ public void BindByType(LoginType loginType, Action<bool, XDGError> callback)
234
+ {
235
+ var command = new Command.Builder()
236
+ .Service(BridgeConstants.Account.BRIDGE_NAME)
237
+ .Method("bindByType")
238
+ .Args("bindByType", loginType.FormatString())
239
+ .Callback(true)
240
+ .OnceTime(true)
241
+ .CommandBuilder();
242
+
243
+ EngineBridge.GetInstance().CallHandler(command, result =>
244
+ {
245
+ XDGLogger.Debug("bindByType 方法结果: " + result.ToJson());
246
+
247
+ var xdgError = result.Parse2XDGError();
248
+ if (xdgError != null)
249
+ {
250
+ callback(false, xdgError);
251
+ return;
252
+ }
253
+
254
+ var contentDic = XDGJson.Deserialize(result.content) as Dictionary<string, object>;
255
+ var success = XDDictionary.GetValue<bool>(contentDic, "success");
256
+
257
+ callback(success, null);
258
+ });
259
+ }
260
+
261
+ public async Task<Dictionary<string, string>> GetRequestAuthorizationHeader(HttpRequestMessage request, long timestamp)
262
+ {
263
+ var url = request.RequestUri.AbsoluteUri;
264
+ var method = request.Method.ToString().ToUpper();
265
+ var authorization = "";
266
+ #if UNITY_ANDROID
267
+ using (var AccountBridgeClass = new AndroidJavaClass(BridgeConstants.Account.SERVICE_IMPL))
268
+ {
269
+ authorization = AccountBridgeClass.CallStatic<string>("getRequestAuthorizationHeaderString", url, method, timestamp);
270
+ }
271
+ #elif UNITY_IOS
272
+ IntPtr ptr = XDAccountBridgeGetAuthorization(url, method, timestamp);
273
+ authorization = Marshal.PtrToStringAnsi(ptr);
274
+ #endif
275
+ if (string.IsNullOrEmpty(authorization))
276
+ {
277
+ return new Dictionary<string, string>();
278
+ }
279
+
280
+ return new Dictionary<string, string>
281
+ {
282
+ { "Authorization", authorization }
283
+ };
284
+ }
285
+ #if UNITY_IOS
286
+ [DllImport("__Internal")]
287
+ private static extern IntPtr XDAccountBridgeGetAuthorization(string url, string method, long timestamp);
288
+ #endif
289
+
290
+ private async Task SyncTdsUser(XDGUser user)
291
+ {
292
+ try
293
+ {
294
+ var result = await XDGEventBus.PublishAsync<Dictionary<string, object>>(XDGEvents.TdsSDKGetUser);
295
+ var objectId = XDDictionary.GetValue<string>(result, "objectId");
296
+ if (objectId == user.UserId)
297
+ {
298
+ return;
299
+ }
300
+
301
+ // XDGEventBus.Publish(XDGEvents.TdsSDKLogout);
302
+ var response = await HttpClient.PostAsync<LoginSyncResponse>(LoginSynUrl);
303
+ var sessionToken = XDDictionary.GetValue<string>(response.Data, "sessionToken");
304
+ if (string.IsNullOrEmpty(sessionToken))
305
+ {
306
+ XDGLogger.Warn("[SyncTDSUser] sessionToken is Null!");
307
+ return;
308
+ }
309
+
310
+ XDGEventBus.Publish(XDGEvents.TdsSDKSyncUser, sessionToken, user.UserId);
311
+ }
312
+ catch (Exception e)
313
+ {
314
+ XDGLogger.Warn($"[SyncTDSUser] error:{e.Message}");
315
+ }
316
+ }
317
+
318
+ private void RefreshFacebookToken()
319
+ {
320
+ #if UNITY_ANDROID
321
+ using (var accountBridgeClass = new AndroidJavaClass(BridgeConstants.Account.SERVICE_IMPL))
322
+ {
323
+ var fbToken = accountBridgeClass.CallStatic<string>("getFacebookToken");
324
+ XDGLogger.Debug($"[GetFacebookToken] fbToken:{fbToken}");
325
+ var tokenDic = JsonConvert.DeserializeObject<Dictionary<string, object>>(fbToken);
326
+ if (tokenDic.ContainsKey("error"))
327
+ {
328
+ XDGLogger.Warn($"[GetFacebookToken] error:{JsonConvert.SerializeObject(tokenDic)}");
329
+ return;
330
+ }
331
+
332
+ var token = XDDictionary.GetValue<string>(tokenDic, "access_token");
333
+ var userId = XDDictionary.GetValue<string>(tokenDic, "userID");
334
+ XDGEventBus.Publish(XDGEvents.TdsSDKSyncFacebookToken, token, userId);
335
+ }
336
+ #endif
337
+ }
338
+ }
339
+ }
340
+
341
+ #endif
@@ -1,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: 79e93cb99498a4778acc3f608e4f33cb
2
+ guid: 93ae8598973a407abadb408fd6cabdfa
3
3
  MonoImporter:
4
4
  externalObjects: {}
5
5
  serializedVersion: 2
@@ -0,0 +1,14 @@
1
+ #if UNITY_IOS || UNITY_ANDROID
2
+
3
+ using System.Collections.Generic;
4
+ using Newtonsoft.Json;
5
+ using XD.SDK.Common.Internal;
6
+
7
+ namespace XD.SDK.Account.Internal.Http
8
+ {
9
+ public class LoginSyncResponse : BaseResponse
10
+ {
11
+ [JsonProperty("data")] public Dictionary<string, object> Data;
12
+ }
13
+ }
14
+ #endif
@@ -0,0 +1,3 @@
1
+ fileFormatVersion: 2
2
+ guid: 2e63b267153141939359668e82217cb0
3
+ timeCreated: 1752580026
@@ -0,0 +1,37 @@
1
+ #if UNITY_IOS || UNITY_ANDROID
2
+ using System.Collections.Generic;
3
+ using System.Net.Http;
4
+ using System.Threading;
5
+ using System.Threading.Tasks;
6
+ using Newtonsoft.Json;
7
+ using XD.SDK.Common;
8
+ using XD.SDK.Common.Internal;
9
+ using XD.SDK.Common.Internal.Http;
10
+
11
+ namespace XD.SDK.Account.Internal.Mobile
12
+ {
13
+ public class MacAuthenticationInterceptor : HttpInterceptor
14
+ {
15
+ protected override async Task BeforeRequestAsync(IHttpRequest request, CancellationToken cancellationToken)
16
+ {
17
+ XDGLogger.Debug($"[MacAuthenticationInterceptor] request Url: {JsonConvert.SerializeObject(request.Url)}");
18
+
19
+ var authDic = await GetMacToken(request.Url, request.Method);
20
+ var authToken = "";
21
+ authDic?.TryGetValue("Authorization", out authToken);
22
+ if (authToken != null && !string.IsNullOrEmpty(authToken))
23
+ {
24
+ request.Headers["Authorization"] = authToken;
25
+ }
26
+
27
+ XDGLogger.Debug($"[MacAuthenticationInterceptor] request Headers: {JsonConvert.SerializeObject(request.Headers)}");
28
+ }
29
+
30
+ private static Task<Dictionary<string, string>> GetMacToken(string requestUrl, HttpMethod method)
31
+ {
32
+ var httpMessage = new HttpRequestMessage(method, requestUrl);
33
+ return AccountFeaturesImpl.Instance.GetRequestAuthorizationHeader(httpMessage, ServerTime.GetTimestamp());
34
+ }
35
+ }
36
+ }
37
+ #endif
@@ -0,0 +1,3 @@
1
+ fileFormatVersion: 2
2
+ guid: ef380eb06e17405cb2fe66d5673693c5
3
+ timeCreated: 1752575768
@@ -0,0 +1,3 @@
1
+ fileFormatVersion: 2
2
+ guid: ac4a3d1fe62b439facb4aebb23a8e77f
3
+ timeCreated: 1752576069
@@ -1,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: a6ccd9a263baa4cb2ba13d6dd4970353
2
+ guid: b0b8b4b67e6a469db1859cb4496e6923
3
3
  folderAsset: yes
4
4
  DefaultImporter:
5
5
  externalObjects: {}