Skip to content

Commit

Permalink
https://api.playfab.com/releaseNotes/#170710
Browse files Browse the repository at this point in the history
  • Loading branch information
PlayFabJenkinsBot committed Jul 10, 2017
2 parents fb8637e + a088604 commit fef818b
Show file tree
Hide file tree
Showing 13 changed files with 148 additions and 6 deletions.
Binary file modified Defold/PlayFabClientSdk.zip
Binary file not shown.
Binary file modified Defold/PlayFabClientTestExample.zip
Binary file not shown.
Binary file modified Defold/PlayFabComboSdk.zip
Binary file not shown.
Binary file modified Defold/PlayFabServerSdk.zip
Binary file not shown.
17 changes: 17 additions & 0 deletions PlayFabClientSDK/PlayFab/PlayFabClientApi.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions PlayFabClientSDK/PlayFab/PlayFabSettings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
45 changes: 45 additions & 0 deletions PlayFabSDK/PlayFab/PlayFabAdminApi.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
17 changes: 17 additions & 0 deletions PlayFabSDK/PlayFab/PlayFabClientApi.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions PlayFabSDK/PlayFab/PlayFabServerApi.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions PlayFabSDK/PlayFab/PlayFabSettings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
45 changes: 45 additions & 0 deletions PlayFabServerSDK/PlayFab/PlayFabAdminApi.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Loading

0 comments on commit fef818b

Please sign in to comment.