com.xd.sdk.account 6.29.1 → 7.0.1

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.1.aar +0 -0
  2. package/{Mobile/Plugins/Android/com/xd/account/bridge/XDGAccountBridge.java.meta → Plugins/Android/libs/XDGAccount_7.0.1.aar.meta} +2 -2
  3. package/Plugins/Android/libs/XDGBridgeAccount_v7_7.0.1.aar +0 -0
  4. package/{Mobile/Plugins/Android/com/xd/account/bridge/XDGLoginServiceUnity.java.meta → Plugins/Android/libs/XDGBridgeAccount_v7_7.0.1.aar.meta} +2 -2
  5. package/Plugins/Android/libs/XDGSupport_7.0.1.aar +0 -0
  6. package/{Mobile/Plugins/Android/com/xd/account/bridge/XDGLoginServiceUnityImpl.java.meta → Plugins/Android/libs/XDGSupport_7.0.1.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.1.aar +0 -0
  172. package/Plugins/Android/libs/XDGAccount_6.29.1.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,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: 592fa979ccca249c493b92cf0137cdb5
2
+ guid: ab376f24625a433ba871af3acc3c6898
3
3
  DefaultImporter:
4
4
  externalObjects: {}
5
5
  userData:
@@ -1,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: 0f171ffb5053644acb424b8b8560076e
2
+ guid: bbcff6e2a586403b95afc97b623b5184
3
3
  DefaultImporter:
4
4
  externalObjects: {}
5
5
  userData:
@@ -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:
@@ -1,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: 08fe1079ee053488b978901a4536f72d
2
+ guid: e9d7db59294d4cc5b203f0bd29ebb026
3
3
  DefaultImporter:
4
4
  externalObjects: {}
5
5
  userData:
@@ -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,7 +7,7 @@ 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:
@@ -21,6 +20,7 @@ PluginImporter:
21
20
  Exclude Editor: 1
22
21
  Exclude Linux64: 1
23
22
  Exclude OSXUniversal: 1
23
+ Exclude WebGL: 1
24
24
  Exclude Win: 1
25
25
  Exclude Win64: 1
26
26
  Exclude iOS: 0
@@ -72,7 +72,7 @@ PluginImporter:
72
72
  second:
73
73
  enabled: 1
74
74
  settings:
75
- AddToEmbeddedBinaries: false
75
+ AddToEmbeddedBinaries: true
76
76
  CPU: AnyCPU
77
77
  CompileFlags:
78
78
  FrameworkDependencies:
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,348 @@
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.ServiceName, BridgeConstants.Account.ServiceImpl);
70
+ }
71
+
72
+ public void AddUserStatusChangeCallback(Action<XDGUserStatusCodeType, string> callback)
73
+ {
74
+ var command = new Command.Builder()
75
+ .Service(BridgeConstants.Account.BridgeName)
76
+ .Method("addUserStatusChangeCallback")
77
+ .Callback(true)
78
+ .OnceTime(false)
79
+ .CommandBuilder();
80
+ EngineBridge.GetInstance().CallHandler(command, (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.BridgeName)
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
+
128
+ callback(user);
129
+ return;
130
+ }
131
+
132
+ errorCallback(new XDGError(ResponseCode.Common.Failed, "user is null"));
133
+ });
134
+ }
135
+
136
+ public void LoginByConsole(Action<XDGUser> successCallback, Action failCallback, Action<XDGError> errorCallback)
137
+ {
138
+ errorCallback(new XDGError(ResponseCode.Common.UnavailableService, "该平台不支持主机登录"));
139
+ Debug.LogError($"该平台:{Application.platform}不支持主机登录");
140
+ }
141
+
142
+ public void Logout()
143
+ {
144
+ var command = new Command.Builder()
145
+ .Service(BridgeConstants.Account.BridgeName)
146
+ .Method("logout")
147
+ .Callback(false)
148
+ .OnceTime(true)
149
+ .CommandBuilder();
150
+ EngineBridge.GetInstance().CallHandler(command);
151
+ }
152
+
153
+ public XDGUser GetCurrentUser()
154
+ {
155
+ XDGUser resultUser = null;
156
+ string currentUserString = null;
157
+ #if UNITY_ANDROID
158
+ using (var accountBridgeClass = new AndroidJavaClass(BridgeConstants.Account.BridgeStaticImpl))
159
+ {
160
+ currentUserString = accountBridgeClass.CallStatic<string>("getCurrentUser");
161
+ }
162
+ #elif UNITY_IOS
163
+ IntPtr ptr = XDAccountBridgeGetUser();
164
+ currentUserString = Marshal.PtrToStringAnsi(ptr);
165
+ #endif
166
+ if (!string.IsNullOrEmpty(currentUserString))
167
+ {
168
+ try
169
+ {
170
+ resultUser = new XDGUser(currentUserString);
171
+ }
172
+ catch (Exception e)
173
+ {
174
+ XDGLogger.Warn("convert current user error" + e.Message);
175
+ }
176
+ }
177
+
178
+ return resultUser;
179
+ }
180
+
181
+ #if UNITY_IOS
182
+ [DllImport("__Internal")]
183
+ private static extern IntPtr XDAccountBridgeGetUser();
184
+ #endif
185
+
186
+ public void OpenCustomerService(XDGRoleInfo roleInfo, string path, Dictionary<string, object> paramsMap)
187
+ {
188
+ var command = new Command.Builder()
189
+ .Service(BridgeConstants.Account.BridgeName)
190
+ .Method("openCustomerService")
191
+ .Args(XDUtility.BridgeArgToDictionary("openCustomerService", roleInfo))
192
+ .Args("path", path)
193
+ .Args("params", paramsMap)
194
+ .Callback(false)
195
+ .OnceTime(true)
196
+ .CommandBuilder();
197
+ EngineBridge.GetInstance().CallHandler(command);
198
+ }
199
+
200
+ public void OpenUserCenter()
201
+ {
202
+ var command = new Command.Builder()
203
+ .Service(BridgeConstants.Account.BridgeName)
204
+ .Method("openUserCenter")
205
+ .Callback(false)
206
+ .OnceTime(true)
207
+ .CommandBuilder();
208
+ EngineBridge.GetInstance().CallHandler(command);
209
+ }
210
+
211
+ public void OpenUserDashboard(XDGRoleInfo roleInfo)
212
+ {
213
+ var command = new Command.Builder()
214
+ .Service(BridgeConstants.Account.BridgeName)
215
+ .Method("openUserDashboard")
216
+ .Args(XDUtility.BridgeArgToDictionary("openUserDashboard", roleInfo))
217
+ .Callback(false)
218
+ .OnceTime(true)
219
+ .CommandBuilder();
220
+ EngineBridge.GetInstance().CallHandler(command);
221
+ }
222
+
223
+ public void OpenAccountDeletion()
224
+ {
225
+ var command = new Command.Builder()
226
+ .Service(BridgeConstants.Account.BridgeName)
227
+ .Method("openAccountDeletion")
228
+ .Callback(false)
229
+ .OnceTime(true)
230
+ .CommandBuilder();
231
+ EngineBridge.GetInstance().CallHandler(command);
232
+ }
233
+
234
+ public void BindByType(LoginType loginType, Action<bool, XDGError> callback)
235
+ {
236
+ var command = new Command.Builder()
237
+ .Service(BridgeConstants.Account.BridgeName)
238
+ .Method("bindByType")
239
+ .Args("bindByType", loginType.FormatString())
240
+ .Callback(true)
241
+ .OnceTime(true)
242
+ .CommandBuilder();
243
+
244
+ EngineBridge.GetInstance().CallHandler(command, result =>
245
+ {
246
+ XDGLogger.Debug("bindByType 方法结果: " + result.ToJson());
247
+
248
+ var xdgError = result.Parse2XDGError();
249
+ if (xdgError != null)
250
+ {
251
+ callback(false, xdgError);
252
+ return;
253
+ }
254
+
255
+ var contentDic = XDGJson.Deserialize(result.content) as Dictionary<string, object>;
256
+ var success = XDDictionary.GetValue<bool>(contentDic, "success");
257
+
258
+ callback(success, null);
259
+ });
260
+ }
261
+
262
+ public async Task<Dictionary<string, string>> GetRequestAuthorizationHeader(HttpRequestMessage request, long timestamp)
263
+ {
264
+ var url = request.RequestUri.AbsoluteUri;
265
+ var method = request.Method.ToString().ToUpper();
266
+ var authorization = "";
267
+ #if UNITY_ANDROID
268
+ using (var accountBridgeClass = new AndroidJavaClass(BridgeConstants.Account.BridgeStaticImpl))
269
+ {
270
+ authorization = accountBridgeClass.CallStatic<string>("getRequestAuthorizationHeaderString", url, method, timestamp);
271
+ }
272
+ #elif UNITY_IOS
273
+ IntPtr ptr = XDAccountBridgeGetAuthorization(url, method, timestamp);
274
+ authorization = Marshal.PtrToStringAnsi(ptr);
275
+ #endif
276
+ if (string.IsNullOrEmpty(authorization))
277
+ {
278
+ return new Dictionary<string, string>();
279
+ }
280
+
281
+ return new Dictionary<string, string>
282
+ {
283
+ { "Authorization", authorization }
284
+ };
285
+ }
286
+ #if UNITY_IOS
287
+ [DllImport("__Internal")]
288
+ private static extern IntPtr XDAccountBridgeGetAuthorization(string url, string method, long timestamp);
289
+ #endif
290
+
291
+ private async Task SyncTdsUser(XDGUser user)
292
+ {
293
+ var bHasTdsUser = ReflectionUtils.FindType("TapTap.Bootstrap.TDSUser", "XD.SDK.TDSWrapper") != null;
294
+ if (!bHasTdsUser)
295
+ {
296
+ return;
297
+ }
298
+
299
+ try
300
+ {
301
+ var result = await XDGEventBus.PublishAsync<Dictionary<string, object>>(XDGEvents.TdsSDKGetUser);
302
+ var objectId = XDDictionary.GetValue<string>(result, "objectId");
303
+ if (objectId == user.UserId)
304
+ {
305
+ return;
306
+ }
307
+
308
+ //TODO 同步之前先退登 TDSUser
309
+ XDGEventBus.Publish(XDGEvents.TdsSDKLogout);
310
+ var response = await HttpClient.PostAsync<LoginSyncResponse>(LoginSynUrl);
311
+ var sessionToken = XDDictionary.GetValue<string>(response.Data, "sessionToken");
312
+ if (string.IsNullOrEmpty(sessionToken))
313
+ {
314
+ XDGLogger.Warn("[SyncTDSUser] sessionToken is Null!");
315
+ return;
316
+ }
317
+
318
+ XDGEventBus.Publish(XDGEvents.TdsSDKSyncUser, sessionToken, user.UserId);
319
+ }
320
+ catch (Exception e)
321
+ {
322
+ XDGLogger.Warn($"[SyncTDSUser] error:{e.Message}");
323
+ }
324
+ }
325
+
326
+ private void RefreshFacebookToken()
327
+ {
328
+ #if UNITY_ANDROID
329
+ using (var accountBridgeClass = new AndroidJavaClass(BridgeConstants.Account.BridgeStaticImpl))
330
+ {
331
+ var fbToken = accountBridgeClass.CallStatic<string>("getFacebookToken");
332
+ XDGLogger.Debug($"[GetFacebookToken] fbToken:{fbToken}");
333
+ var tokenDic = JsonConvert.DeserializeObject<Dictionary<string, object>>(fbToken);
334
+ if (tokenDic.ContainsKey("error"))
335
+ {
336
+ XDGLogger.Warn($"[GetFacebookToken] error:{JsonConvert.SerializeObject(tokenDic)}");
337
+ return;
338
+ }
339
+ var token = XDDictionary.GetValue<string>(tokenDic, "access_token");
340
+ var userId = XDDictionary.GetValue<string>(tokenDic, "userID");
341
+ XDGEventBus.Publish(XDGEvents.TdsSDKSyncFacebookToken, token, userId);
342
+ }
343
+ #endif
344
+ }
345
+ }
346
+ }
347
+
348
+ #endif
@@ -1,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: eb185310da4348b9a6fefe0f29d3b396
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: {}