diff --git a/Defold/PlayFabClientSdk.zip b/Defold/PlayFabClientSdk.zip index 40db8522..99a542bc 100644 Binary files a/Defold/PlayFabClientSdk.zip and b/Defold/PlayFabClientSdk.zip differ diff --git a/Defold/PlayFabClientTestExample.zip b/Defold/PlayFabClientTestExample.zip index f135d1f0..079e08ea 100644 Binary files a/Defold/PlayFabClientTestExample.zip and b/Defold/PlayFabClientTestExample.zip differ diff --git a/Defold/PlayFabComboSdk.zip b/Defold/PlayFabComboSdk.zip index bf625be7..97b3f1ff 100644 Binary files a/Defold/PlayFabComboSdk.zip and b/Defold/PlayFabComboSdk.zip differ diff --git a/Defold/PlayFabServerSdk.zip b/Defold/PlayFabServerSdk.zip index 3e99e2fb..9aef83a0 100644 Binary files a/Defold/PlayFabServerSdk.zip and b/Defold/PlayFabServerSdk.zip differ diff --git a/PlayFabClientSDK/PlayFab/PlayFabClientApi.lua b/PlayFabClientSDK/PlayFab/PlayFabClientApi.lua index ce0a8816..558f8ddd 100644 --- a/PlayFabClientSDK/PlayFab/PlayFabClientApi.lua +++ b/PlayFabClientSDK/PlayFab/PlayFabClientApi.lua @@ -39,6 +39,14 @@ function PlayFabClientApi.GetPhotonAuthenticationToken(request, onSuccess, onErr IPlayFabHttps.MakePlayFabApiCall("/Client/GetPhotonAuthenticationToken", request, "X-Authorization", PlayFabSettings._internalSettings.sessionTicket, onSuccess, onError) end +-- Returns the title's base 64 encoded RSA CSP blob. +-- API Method Documentation: https://api.playfab.com/Documentation/Client/method/GetTitlePublicKey +-- Request Documentation: https://api.playfab.com/Documentation/Client/datatype/PlayFab.Client.Models/PlayFab.Client.Models.GetTitlePublicKeyRequest +-- Result Documentation: https://api.playfab.com/Documentation/Client/datatype/PlayFab.Client.Models/PlayFab.Client.Models.GetTitlePublicKeyResult +function PlayFabClientApi.GetTitlePublicKey(request, onSuccess, onError) + IPlayFabHttps.MakePlayFabApiCall("/Client/GetTitlePublicKey", request, nil, nil, onSuccess, onError) +end + -- Requests a challenge from the server to be signed by Windows Hello Passport service to authenticate. -- API Method Documentation: https://api.playfab.com/Documentation/Client/method/GetWindowsHelloChallenge -- Request Documentation: https://api.playfab.com/Documentation/Client/datatype/PlayFab.Client.Models/PlayFab.Client.Models.GetWindowsHelloChallengeRequest @@ -299,6 +307,15 @@ function PlayFabClientApi.RegisterWithWindowsHello(request, onSuccess, onError) IPlayFabHttps.MakePlayFabApiCall("/Client/RegisterWithWindowsHello", request, nil, nil, onSuccess, onError) end +-- Sets the player's secret if it is not already set. Player secrets are used to sign API requests. To reset a player's secret use the Admin or Server API method SetPlayerSecret. +-- API Method Documentation: https://api.playfab.com/Documentation/Client/method/SetPlayerSecret +-- Request Documentation: https://api.playfab.com/Documentation/Client/datatype/PlayFab.Client.Models/PlayFab.Client.Models.SetPlayerSecretRequest +-- Result Documentation: https://api.playfab.com/Documentation/Client/datatype/PlayFab.Client.Models/PlayFab.Client.Models.SetPlayerSecretResult +function PlayFabClientApi.SetPlayerSecret(request, onSuccess, onError) + if (not PlayFabClientApi.IsClientLoggedIn()) then error("Must be logged in to call this method") end + IPlayFabHttps.MakePlayFabApiCall("/Client/SetPlayerSecret", request, "X-Authorization", PlayFabSettings._internalSettings.sessionTicket, onSuccess, onError) +end + -- Adds the specified generic service identifier to the player's PlayFab account. This is designed to allow for a PlayFab ID lookup of any arbitrary service identifier a title wants to add. This identifier should never be used as authentication credentials, as the intent is that it is easily accessible by other players. -- API Method Documentation: https://api.playfab.com/Documentation/Client/method/AddGenericID -- Request Documentation: https://api.playfab.com/Documentation/Client/datatype/PlayFab.Client.Models/PlayFab.Client.Models.AddGenericIDRequest diff --git a/PlayFabClientSDK/PlayFab/PlayFabSettings.lua b/PlayFabClientSDK/PlayFab/PlayFabSettings.lua index 5539cd18..2286b8b8 100644 --- a/PlayFabClientSDK/PlayFab/PlayFabSettings.lua +++ b/PlayFabClientSDK/PlayFab/PlayFabSettings.lua @@ -13,8 +13,8 @@ local PlayFabSettings = { _internalSettings = { sessionTicket = nil, - sdkVersionString = "LuaSdk_0.17.170612", - buildIdentifier = "jbuild_luasdk_2" + sdkVersionString = "LuaSdk_0.18.170710", + buildIdentifier = "jbuild_luasdk_0" }, settings = { disableAdvertising = false, diff --git a/PlayFabSDK/PlayFab/PlayFabAdminApi.lua b/PlayFabSDK/PlayFab/PlayFabAdminApi.lua index f6b78d0e..ff1c17a5 100644 --- a/PlayFabSDK/PlayFab/PlayFabAdminApi.lua +++ b/PlayFabSDK/PlayFab/PlayFabAdminApi.lua @@ -12,6 +12,33 @@ local PlayFabAdminApi = { settings = PlayFabSettings.settings } +-- Creates a new Player Shared Secret Key. It may take up to 5 minutes for this key to become generally available after this API returns. +-- API Method Documentation: https://api.playfab.com/Documentation/Admin/method/CreatePlayerSharedSecret +-- Request Documentation: https://api.playfab.com/Documentation/Admin/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.CreatePlayerSharedSecretRequest +-- Result Documentation: https://api.playfab.com/Documentation/Admin/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.CreatePlayerSharedSecretResult +function PlayFabAdminApi.CreatePlayerSharedSecret(request, onSuccess, onError) + if (not PlayFabSettings.settings.titleId or not PlayFabSettings.settings.devSecretKey) then error("Must have PlayFabSettings.settings.devSecretKey set to call this method") end + IPlayFabHttps.MakePlayFabApiCall("/Admin/CreatePlayerSharedSecret", request, "X-SecretKey", PlayFabSettings.settings.devSecretKey, onSuccess, onError) +end + +-- Deletes an existing Player Shared Secret Key. It may take up to 5 minutes for this delete to be reflected after this API returns. +-- API Method Documentation: https://api.playfab.com/Documentation/Admin/method/DeletePlayerSharedSecret +-- Request Documentation: https://api.playfab.com/Documentation/Admin/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.DeletePlayerSharedSecretRequest +-- Result Documentation: https://api.playfab.com/Documentation/Admin/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.DeletePlayerSharedSecretResult +function PlayFabAdminApi.DeletePlayerSharedSecret(request, onSuccess, onError) + if (not PlayFabSettings.settings.titleId or not PlayFabSettings.settings.devSecretKey) then error("Must have PlayFabSettings.settings.devSecretKey set to call this method") end + IPlayFabHttps.MakePlayFabApiCall("/Admin/DeletePlayerSharedSecret", request, "X-SecretKey", PlayFabSettings.settings.devSecretKey, onSuccess, onError) +end + +-- Returns all Player Shared Secret Keys including disabled and expired. +-- API Method Documentation: https://api.playfab.com/Documentation/Admin/method/GetPlayerSharedSecrets +-- Request Documentation: https://api.playfab.com/Documentation/Admin/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.GetPlayerSharedSecretsRequest +-- Result Documentation: https://api.playfab.com/Documentation/Admin/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.GetPlayerSharedSecretsResult +function PlayFabAdminApi.GetPlayerSharedSecrets(request, onSuccess, onError) + if (not PlayFabSettings.settings.titleId or not PlayFabSettings.settings.devSecretKey) then error("Must have PlayFabSettings.settings.devSecretKey set to call this method") end + IPlayFabHttps.MakePlayFabApiCall("/Admin/GetPlayerSharedSecrets", request, "X-SecretKey", PlayFabSettings.settings.devSecretKey, onSuccess, onError) +end + -- Gets the requested policy. -- API Method Documentation: https://api.playfab.com/Documentation/Admin/method/GetPolicy -- Request Documentation: https://api.playfab.com/Documentation/Admin/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.GetPolicyRequest @@ -21,6 +48,24 @@ function PlayFabAdminApi.GetPolicy(request, onSuccess, onError) IPlayFabHttps.MakePlayFabApiCall("/Admin/GetPolicy", request, "X-SecretKey", PlayFabSettings.settings.devSecretKey, onSuccess, onError) end +-- Sets or resets the player's secret. Player secrets are used to sign API requests. +-- API Method Documentation: https://api.playfab.com/Documentation/Admin/method/SetPlayerSecret +-- Request Documentation: https://api.playfab.com/Documentation/Admin/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.SetPlayerSecretRequest +-- Result Documentation: https://api.playfab.com/Documentation/Admin/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.SetPlayerSecretResult +function PlayFabAdminApi.SetPlayerSecret(request, onSuccess, onError) + if (not PlayFabSettings.settings.titleId or not PlayFabSettings.settings.devSecretKey) then error("Must have PlayFabSettings.settings.devSecretKey set to call this method") end + IPlayFabHttps.MakePlayFabApiCall("/Admin/SetPlayerSecret", request, "X-SecretKey", PlayFabSettings.settings.devSecretKey, onSuccess, onError) +end + +-- Updates a existing Player Shared Secret Key. It may take up to 5 minutes for this update to become generally available after this API returns. +-- API Method Documentation: https://api.playfab.com/Documentation/Admin/method/UpdatePlayerSharedSecret +-- Request Documentation: https://api.playfab.com/Documentation/Admin/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.UpdatePlayerSharedSecretRequest +-- Result Documentation: https://api.playfab.com/Documentation/Admin/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.UpdatePlayerSharedSecretResult +function PlayFabAdminApi.UpdatePlayerSharedSecret(request, onSuccess, onError) + if (not PlayFabSettings.settings.titleId or not PlayFabSettings.settings.devSecretKey) then error("Must have PlayFabSettings.settings.devSecretKey set to call this method") end + IPlayFabHttps.MakePlayFabApiCall("/Admin/UpdatePlayerSharedSecret", request, "X-SecretKey", PlayFabSettings.settings.devSecretKey, onSuccess, onError) +end + -- Changes a policy for a title -- API Method Documentation: https://api.playfab.com/Documentation/Admin/method/UpdatePolicy -- Request Documentation: https://api.playfab.com/Documentation/Admin/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.UpdatePolicyRequest diff --git a/PlayFabSDK/PlayFab/PlayFabClientApi.lua b/PlayFabSDK/PlayFab/PlayFabClientApi.lua index ce0a8816..558f8ddd 100644 --- a/PlayFabSDK/PlayFab/PlayFabClientApi.lua +++ b/PlayFabSDK/PlayFab/PlayFabClientApi.lua @@ -39,6 +39,14 @@ function PlayFabClientApi.GetPhotonAuthenticationToken(request, onSuccess, onErr IPlayFabHttps.MakePlayFabApiCall("/Client/GetPhotonAuthenticationToken", request, "X-Authorization", PlayFabSettings._internalSettings.sessionTicket, onSuccess, onError) end +-- Returns the title's base 64 encoded RSA CSP blob. +-- API Method Documentation: https://api.playfab.com/Documentation/Client/method/GetTitlePublicKey +-- Request Documentation: https://api.playfab.com/Documentation/Client/datatype/PlayFab.Client.Models/PlayFab.Client.Models.GetTitlePublicKeyRequest +-- Result Documentation: https://api.playfab.com/Documentation/Client/datatype/PlayFab.Client.Models/PlayFab.Client.Models.GetTitlePublicKeyResult +function PlayFabClientApi.GetTitlePublicKey(request, onSuccess, onError) + IPlayFabHttps.MakePlayFabApiCall("/Client/GetTitlePublicKey", request, nil, nil, onSuccess, onError) +end + -- Requests a challenge from the server to be signed by Windows Hello Passport service to authenticate. -- API Method Documentation: https://api.playfab.com/Documentation/Client/method/GetWindowsHelloChallenge -- Request Documentation: https://api.playfab.com/Documentation/Client/datatype/PlayFab.Client.Models/PlayFab.Client.Models.GetWindowsHelloChallengeRequest @@ -299,6 +307,15 @@ function PlayFabClientApi.RegisterWithWindowsHello(request, onSuccess, onError) IPlayFabHttps.MakePlayFabApiCall("/Client/RegisterWithWindowsHello", request, nil, nil, onSuccess, onError) end +-- Sets the player's secret if it is not already set. Player secrets are used to sign API requests. To reset a player's secret use the Admin or Server API method SetPlayerSecret. +-- API Method Documentation: https://api.playfab.com/Documentation/Client/method/SetPlayerSecret +-- Request Documentation: https://api.playfab.com/Documentation/Client/datatype/PlayFab.Client.Models/PlayFab.Client.Models.SetPlayerSecretRequest +-- Result Documentation: https://api.playfab.com/Documentation/Client/datatype/PlayFab.Client.Models/PlayFab.Client.Models.SetPlayerSecretResult +function PlayFabClientApi.SetPlayerSecret(request, onSuccess, onError) + if (not PlayFabClientApi.IsClientLoggedIn()) then error("Must be logged in to call this method") end + IPlayFabHttps.MakePlayFabApiCall("/Client/SetPlayerSecret", request, "X-Authorization", PlayFabSettings._internalSettings.sessionTicket, onSuccess, onError) +end + -- Adds the specified generic service identifier to the player's PlayFab account. This is designed to allow for a PlayFab ID lookup of any arbitrary service identifier a title wants to add. This identifier should never be used as authentication credentials, as the intent is that it is easily accessible by other players. -- API Method Documentation: https://api.playfab.com/Documentation/Client/method/AddGenericID -- Request Documentation: https://api.playfab.com/Documentation/Client/datatype/PlayFab.Client.Models/PlayFab.Client.Models.AddGenericIDRequest diff --git a/PlayFabSDK/PlayFab/PlayFabServerApi.lua b/PlayFabSDK/PlayFab/PlayFabServerApi.lua index 9afda234..f6fa2436 100644 --- a/PlayFabSDK/PlayFab/PlayFabServerApi.lua +++ b/PlayFabSDK/PlayFab/PlayFabServerApi.lua @@ -21,6 +21,15 @@ function PlayFabServerApi.AuthenticateSessionTicket(request, onSuccess, onError) IPlayFabHttps.MakePlayFabApiCall("/Server/AuthenticateSessionTicket", request, "X-SecretKey", PlayFabSettings.settings.devSecretKey, onSuccess, onError) end +-- Sets the player's secret if it is not already set. Player secrets are used to sign API requests. To reset a player's secret use the Admin or Server API method SetPlayerSecret. +-- API Method Documentation: https://api.playfab.com/Documentation/Server/method/SetPlayerSecret +-- Request Documentation: https://api.playfab.com/Documentation/Server/datatype/PlayFab.Server.Models/PlayFab.Server.Models.SetPlayerSecretRequest +-- Result Documentation: https://api.playfab.com/Documentation/Server/datatype/PlayFab.Server.Models/PlayFab.Server.Models.SetPlayerSecretResult +function PlayFabServerApi.SetPlayerSecret(request, onSuccess, onError) + if (not PlayFabSettings.settings.titleId or not PlayFabSettings.settings.devSecretKey) then error("Must have PlayFabSettings.settings.devSecretKey set to call this method") end + IPlayFabHttps.MakePlayFabApiCall("/Server/SetPlayerSecret", request, "X-SecretKey", PlayFabSettings.settings.devSecretKey, onSuccess, onError) +end + -- Bans users by PlayFab ID with optional IP address, or MAC address for the provided game. -- API Method Documentation: https://api.playfab.com/Documentation/Server/method/BanUsers -- Request Documentation: https://api.playfab.com/Documentation/Server/datatype/PlayFab.Server.Models/PlayFab.Server.Models.BanUsersRequest diff --git a/PlayFabSDK/PlayFab/PlayFabSettings.lua b/PlayFabSDK/PlayFab/PlayFabSettings.lua index b70364c6..fb0b27aa 100644 --- a/PlayFabSDK/PlayFab/PlayFabSettings.lua +++ b/PlayFabSDK/PlayFab/PlayFabSettings.lua @@ -13,8 +13,8 @@ local PlayFabSettings = { _internalSettings = { sessionTicket = nil, - sdkVersionString = "LuaSdk_0.17.170612", - buildIdentifier = "jbuild_luasdk_2" + sdkVersionString = "LuaSdk_0.18.170710", + buildIdentifier = "jbuild_luasdk_0" }, settings = { devSecretKey = nil, -- This should never be assigned in a client distribution diff --git a/PlayFabServerSDK/PlayFab/PlayFabAdminApi.lua b/PlayFabServerSDK/PlayFab/PlayFabAdminApi.lua index f6b78d0e..ff1c17a5 100644 --- a/PlayFabServerSDK/PlayFab/PlayFabAdminApi.lua +++ b/PlayFabServerSDK/PlayFab/PlayFabAdminApi.lua @@ -12,6 +12,33 @@ local PlayFabAdminApi = { settings = PlayFabSettings.settings } +-- Creates a new Player Shared Secret Key. It may take up to 5 minutes for this key to become generally available after this API returns. +-- API Method Documentation: https://api.playfab.com/Documentation/Admin/method/CreatePlayerSharedSecret +-- Request Documentation: https://api.playfab.com/Documentation/Admin/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.CreatePlayerSharedSecretRequest +-- Result Documentation: https://api.playfab.com/Documentation/Admin/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.CreatePlayerSharedSecretResult +function PlayFabAdminApi.CreatePlayerSharedSecret(request, onSuccess, onError) + if (not PlayFabSettings.settings.titleId or not PlayFabSettings.settings.devSecretKey) then error("Must have PlayFabSettings.settings.devSecretKey set to call this method") end + IPlayFabHttps.MakePlayFabApiCall("/Admin/CreatePlayerSharedSecret", request, "X-SecretKey", PlayFabSettings.settings.devSecretKey, onSuccess, onError) +end + +-- Deletes an existing Player Shared Secret Key. It may take up to 5 minutes for this delete to be reflected after this API returns. +-- API Method Documentation: https://api.playfab.com/Documentation/Admin/method/DeletePlayerSharedSecret +-- Request Documentation: https://api.playfab.com/Documentation/Admin/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.DeletePlayerSharedSecretRequest +-- Result Documentation: https://api.playfab.com/Documentation/Admin/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.DeletePlayerSharedSecretResult +function PlayFabAdminApi.DeletePlayerSharedSecret(request, onSuccess, onError) + if (not PlayFabSettings.settings.titleId or not PlayFabSettings.settings.devSecretKey) then error("Must have PlayFabSettings.settings.devSecretKey set to call this method") end + IPlayFabHttps.MakePlayFabApiCall("/Admin/DeletePlayerSharedSecret", request, "X-SecretKey", PlayFabSettings.settings.devSecretKey, onSuccess, onError) +end + +-- Returns all Player Shared Secret Keys including disabled and expired. +-- API Method Documentation: https://api.playfab.com/Documentation/Admin/method/GetPlayerSharedSecrets +-- Request Documentation: https://api.playfab.com/Documentation/Admin/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.GetPlayerSharedSecretsRequest +-- Result Documentation: https://api.playfab.com/Documentation/Admin/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.GetPlayerSharedSecretsResult +function PlayFabAdminApi.GetPlayerSharedSecrets(request, onSuccess, onError) + if (not PlayFabSettings.settings.titleId or not PlayFabSettings.settings.devSecretKey) then error("Must have PlayFabSettings.settings.devSecretKey set to call this method") end + IPlayFabHttps.MakePlayFabApiCall("/Admin/GetPlayerSharedSecrets", request, "X-SecretKey", PlayFabSettings.settings.devSecretKey, onSuccess, onError) +end + -- Gets the requested policy. -- API Method Documentation: https://api.playfab.com/Documentation/Admin/method/GetPolicy -- Request Documentation: https://api.playfab.com/Documentation/Admin/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.GetPolicyRequest @@ -21,6 +48,24 @@ function PlayFabAdminApi.GetPolicy(request, onSuccess, onError) IPlayFabHttps.MakePlayFabApiCall("/Admin/GetPolicy", request, "X-SecretKey", PlayFabSettings.settings.devSecretKey, onSuccess, onError) end +-- Sets or resets the player's secret. Player secrets are used to sign API requests. +-- API Method Documentation: https://api.playfab.com/Documentation/Admin/method/SetPlayerSecret +-- Request Documentation: https://api.playfab.com/Documentation/Admin/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.SetPlayerSecretRequest +-- Result Documentation: https://api.playfab.com/Documentation/Admin/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.SetPlayerSecretResult +function PlayFabAdminApi.SetPlayerSecret(request, onSuccess, onError) + if (not PlayFabSettings.settings.titleId or not PlayFabSettings.settings.devSecretKey) then error("Must have PlayFabSettings.settings.devSecretKey set to call this method") end + IPlayFabHttps.MakePlayFabApiCall("/Admin/SetPlayerSecret", request, "X-SecretKey", PlayFabSettings.settings.devSecretKey, onSuccess, onError) +end + +-- Updates a existing Player Shared Secret Key. It may take up to 5 minutes for this update to become generally available after this API returns. +-- API Method Documentation: https://api.playfab.com/Documentation/Admin/method/UpdatePlayerSharedSecret +-- Request Documentation: https://api.playfab.com/Documentation/Admin/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.UpdatePlayerSharedSecretRequest +-- Result Documentation: https://api.playfab.com/Documentation/Admin/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.UpdatePlayerSharedSecretResult +function PlayFabAdminApi.UpdatePlayerSharedSecret(request, onSuccess, onError) + if (not PlayFabSettings.settings.titleId or not PlayFabSettings.settings.devSecretKey) then error("Must have PlayFabSettings.settings.devSecretKey set to call this method") end + IPlayFabHttps.MakePlayFabApiCall("/Admin/UpdatePlayerSharedSecret", request, "X-SecretKey", PlayFabSettings.settings.devSecretKey, onSuccess, onError) +end + -- Changes a policy for a title -- API Method Documentation: https://api.playfab.com/Documentation/Admin/method/UpdatePolicy -- Request Documentation: https://api.playfab.com/Documentation/Admin/datatype/PlayFab.Admin.Models/PlayFab.Admin.Models.UpdatePolicyRequest diff --git a/PlayFabServerSDK/PlayFab/PlayFabServerApi.lua b/PlayFabServerSDK/PlayFab/PlayFabServerApi.lua index 9afda234..f6fa2436 100644 --- a/PlayFabServerSDK/PlayFab/PlayFabServerApi.lua +++ b/PlayFabServerSDK/PlayFab/PlayFabServerApi.lua @@ -21,6 +21,15 @@ function PlayFabServerApi.AuthenticateSessionTicket(request, onSuccess, onError) IPlayFabHttps.MakePlayFabApiCall("/Server/AuthenticateSessionTicket", request, "X-SecretKey", PlayFabSettings.settings.devSecretKey, onSuccess, onError) end +-- Sets the player's secret if it is not already set. Player secrets are used to sign API requests. To reset a player's secret use the Admin or Server API method SetPlayerSecret. +-- API Method Documentation: https://api.playfab.com/Documentation/Server/method/SetPlayerSecret +-- Request Documentation: https://api.playfab.com/Documentation/Server/datatype/PlayFab.Server.Models/PlayFab.Server.Models.SetPlayerSecretRequest +-- Result Documentation: https://api.playfab.com/Documentation/Server/datatype/PlayFab.Server.Models/PlayFab.Server.Models.SetPlayerSecretResult +function PlayFabServerApi.SetPlayerSecret(request, onSuccess, onError) + if (not PlayFabSettings.settings.titleId or not PlayFabSettings.settings.devSecretKey) then error("Must have PlayFabSettings.settings.devSecretKey set to call this method") end + IPlayFabHttps.MakePlayFabApiCall("/Server/SetPlayerSecret", request, "X-SecretKey", PlayFabSettings.settings.devSecretKey, onSuccess, onError) +end + -- Bans users by PlayFab ID with optional IP address, or MAC address for the provided game. -- API Method Documentation: https://api.playfab.com/Documentation/Server/method/BanUsers -- Request Documentation: https://api.playfab.com/Documentation/Server/datatype/PlayFab.Server.Models/PlayFab.Server.Models.BanUsersRequest diff --git a/PlayFabServerSDK/PlayFab/PlayFabSettings.lua b/PlayFabServerSDK/PlayFab/PlayFabSettings.lua index 053b15ee..4f4f7011 100644 --- a/PlayFabServerSDK/PlayFab/PlayFabSettings.lua +++ b/PlayFabServerSDK/PlayFab/PlayFabSettings.lua @@ -12,8 +12,8 @@ local PlayFabSettings = { _internalSettings = { - sdkVersionString = "LuaSdk_0.17.170612", - buildIdentifier = "jbuild_luasdk_2" + sdkVersionString = "LuaSdk_0.18.170710", + buildIdentifier = "jbuild_luasdk_0" }, settings = { devSecretKey = nil, -- This should never be assigned in a client distribution