Skip to content

Commit bbb62e5

Browse files
PlayFab SDK TeamPlayFab SDK Team
authored andcommitted
https://docs.microsoft.com/en-us/gaming/playfab/release-notes/#251205
2 parents da491d4 + 8256ea0 commit bbb62e5

33 files changed

Lines changed: 1051 additions & 41 deletions

PlayFabSDK/source/IPlayFabAdminInstanceAPI.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Task<PlayFabResult<BlankResult>> AddVirtualCurrencyTypesAsync(
6565
Dictionary<string, string> extraHeaders = null);
6666

6767
/// <summary>
68-
/// Bans users by PlayFab ID with optional IP address, or MAC address for the provided game.
68+
/// Bans users by PlayFab ID with optional IP address for the provided game.
6969
/// </summary>
7070
Task<PlayFabResult<BanUsersResult>> BanUsersAsync(
7171
BanUsersRequest request,

PlayFabSDK/source/IPlayFabClientInstanceAPI.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,16 @@ Task<PlayFabResult<GetPlayFabIDsFromNintendoSwitchDeviceIdsResult>> GetPlayFabID
508508
object customData = null,
509509
Dictionary<string, string> extraHeaders = null);
510510

511+
/// <summary>
512+
/// Retrieves the unique PlayFab identifiers for the given set of OpenId subject identifiers. A OpenId identifier is the
513+
/// service name plus the service-specific ID for the player, as specified by the title when the OpenId identifier was added
514+
/// to the player account.
515+
/// </summary>
516+
Task<PlayFabResult<GetPlayFabIDsFromOpenIdsResult>> GetPlayFabIDsFromOpenIdSubjectIdentifiersAsync(
517+
GetPlayFabIDsFromOpenIdsRequest request,
518+
object customData = null,
519+
Dictionary<string, string> extraHeaders = null);
520+
511521
/// <summary>
512522
/// Retrieves the unique PlayFab identifiers for the given set of PlayStation :tm: Network identifiers.
513523
/// </summary>

PlayFabSDK/source/IPlayFabServerInstanceAPI.cs

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Task<PlayFabResult<AwardSteamAchievementResult>> AwardSteamAchievementAsync(
8787
Dictionary<string, string> extraHeaders = null);
8888

8989
/// <summary>
90-
/// Bans users by PlayFab ID with optional IP address, or MAC address for the provided game.
90+
/// Bans users by PlayFab ID with optional IP address for the provided game.
9191
/// </summary>
9292
Task<PlayFabResult<BanUsersResult>> BanUsersAsync(
9393
BanUsersRequest request,
@@ -435,6 +435,16 @@ Task<PlayFabResult<GetPlayFabIDsFromNintendoSwitchDeviceIdsResult>> GetPlayFabID
435435
object customData = null,
436436
Dictionary<string, string> extraHeaders = null);
437437

438+
/// <summary>
439+
/// Retrieves the unique PlayFab identifiers for the given set of OpenId subject identifiers. A OpenId subject identifier is
440+
/// the OpenId issuer plus the OpenId subject for the player, as specified by the title when the OpenId identifier was added
441+
/// to the player account.
442+
/// </summary>
443+
Task<PlayFabResult<GetPlayFabIDsFromOpenIdsResult>> GetPlayFabIDsFromOpenIdSubjectIdentifiersAsync(
444+
GetPlayFabIDsFromOpenIdsRequest request,
445+
object customData = null,
446+
Dictionary<string, string> extraHeaders = null);
447+
438448
/// <summary>
439449
/// Retrieves the unique PlayFab identifiers for the given set of PlayStation :tm: Network identifiers.
440450
/// </summary>
@@ -738,6 +748,14 @@ Task<PlayFabResult<LinkSteamIdResult>> LinkSteamIdAsync(
738748
object customData = null,
739749
Dictionary<string, string> extraHeaders = null);
740750

751+
/// <summary>
752+
/// Links the Twitch account associated with the token to the user's PlayFab account.
753+
/// </summary>
754+
Task<PlayFabResult<EmptyResult>> LinkTwitchAccountAsync(
755+
LinkTwitchAccountRequest request,
756+
object customData = null,
757+
Dictionary<string, string> extraHeaders = null);
758+
741759
/// <summary>
742760
/// Links the Xbox Live account associated with the provided access code to the user's PlayFab account
743761
/// </summary>
@@ -824,6 +842,14 @@ Task<PlayFabResult<ServerLoginResult>> LoginWithSteamIdAsync(
824842
object customData = null,
825843
Dictionary<string, string> extraHeaders = null);
826844

845+
/// <summary>
846+
/// Sign in the user with a Twitch access token
847+
/// </summary>
848+
Task<PlayFabResult<ServerLoginResult>> LoginWithTwitchAsync(
849+
LoginWithTwitchRequest request,
850+
object customData = null,
851+
Dictionary<string, string> extraHeaders = null);
852+
827853
/// <summary>
828854
/// Signs the user in using a Xbox Live Token from an external server backend, returning a session identifier that can
829855
/// subsequently be used for API calls which require an authenticated user
@@ -1118,6 +1144,14 @@ Task<PlayFabResult<UnlinkSteamIdResult>> UnlinkSteamIdAsync(
11181144
object customData = null,
11191145
Dictionary<string, string> extraHeaders = null);
11201146

1147+
/// <summary>
1148+
/// Unlinks the related Twitch account from the user's PlayFab account.
1149+
/// </summary>
1150+
Task<PlayFabResult<EmptyResult>> UnlinkTwitchAccountAsync(
1151+
UnlinkTwitchAccountRequest request,
1152+
object customData = null,
1153+
Dictionary<string, string> extraHeaders = null);
1154+
11211155
/// <summary>
11221156
/// Unlinks the related Xbox Live account from the user's PlayFab account
11231157
/// </summary>

PlayFabSDK/source/PlayFabAdminAPI.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ public static async Task<PlayFabResult<BlankResult>> AddVirtualCurrencyTypesAsyn
192192
}
193193

194194
/// <summary>
195-
/// Bans users by PlayFab ID with optional IP address, or MAC address for the provided game.
195+
/// Bans users by PlayFab ID with optional IP address for the provided game.
196196
/// </summary>
197197
public static async Task<PlayFabResult<BanUsersResult>> BanUsersAsync(BanUsersRequest request, object customData = null, Dictionary<string, string> extraHeaders = null)
198198
{

PlayFabSDK/source/PlayFabAdminInstanceAPI.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ public async Task<PlayFabResult<BlankResult>> AddVirtualCurrencyTypesAsync(AddVi
207207
}
208208

209209
/// <summary>
210-
/// Bans users by PlayFab ID with optional IP address, or MAC address for the provided game.
210+
/// Bans users by PlayFab ID with optional IP address for the provided game.
211211
/// </summary>
212212
public async Task<PlayFabResult<BanUsersResult>> BanUsersAsync(BanUsersRequest request, object customData = null, Dictionary<string, string> extraHeaders = null)
213213
{

PlayFabSDK/source/PlayFabAdminModels.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -541,8 +541,8 @@ public class BanRequest : PlayFabRequestCommon
541541
}
542542

543543
/// <summary>
544-
/// The existence of each user will not be verified. When banning by IP or MAC address, multiple players may be affected, so
545-
/// use this feature with caution. Returns information about the new bans.
544+
/// The existence of each user will not be verified. When banning by IP, multiple players may be affected, so use this
545+
/// feature with caution. Returns information about the new bans.
546546
/// </summary>
547547
public class BanUsersRequest : PlayFabRequestCommon
548548
{
@@ -3322,6 +3322,7 @@ public enum GenericErrorCodes
33223322
UnsupportedEntityType,
33233323
EntityTypeSpecifiedRequiresAggregationSource,
33243324
PlayFabErrorEventNotSupportedForEntityType,
3325+
MetadataLengthExceeded,
33253326
StoreMetricsRequestInvalidInput,
33263327
StoreMetricsErrorRetrievingMetrics
33273328
}

PlayFabSDK/source/PlayFabClientAPI.cs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1593,6 +1593,35 @@ public static async Task<PlayFabResult<GetPlayFabIDsFromNintendoSwitchDeviceIdsR
15931593
return new PlayFabResult<GetPlayFabIDsFromNintendoSwitchDeviceIdsResult> { Result = result, CustomData = customData };
15941594
}
15951595

1596+
/// <summary>
1597+
/// Retrieves the unique PlayFab identifiers for the given set of OpenId subject identifiers. A OpenId identifier is the
1598+
/// service name plus the service-specific ID for the player, as specified by the title when the OpenId identifier was added
1599+
/// to the player account.
1600+
/// </summary>
1601+
public static async Task<PlayFabResult<GetPlayFabIDsFromOpenIdsResult>> GetPlayFabIDsFromOpenIdSubjectIdentifiersAsync(GetPlayFabIDsFromOpenIdsRequest request, object customData = null, Dictionary<string, string> extraHeaders = null)
1602+
{
1603+
await new PlayFabUtil.SynchronizationContextRemover();
1604+
1605+
var requestContext = request?.AuthenticationContext ?? PlayFabSettings.staticPlayer;
1606+
var requestSettings = PlayFabSettings.staticSettings;
1607+
if (requestContext.ClientSessionTicket == null) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn, "Must be logged in to call this method");
1608+
1609+
1610+
var httpResult = await PlayFabHttp.DoPost("/Client/GetPlayFabIDsFromOpenIdSubjectIdentifiers", request, "X-Authorization", requestContext.ClientSessionTicket, extraHeaders);
1611+
if (httpResult is PlayFabError)
1612+
{
1613+
var error = (PlayFabError)httpResult;
1614+
PlayFabSettings.GlobalErrorHandler?.Invoke(error);
1615+
return new PlayFabResult<GetPlayFabIDsFromOpenIdsResult> { Error = error, CustomData = customData };
1616+
}
1617+
1618+
var resultRawJson = (string)httpResult;
1619+
var resultData = PluginManager.GetPlugin<ISerializerPlugin>(PluginContract.PlayFab_Serializer).DeserializeObject<PlayFabJsonSuccess<GetPlayFabIDsFromOpenIdsResult>>(resultRawJson);
1620+
var result = resultData.data;
1621+
1622+
return new PlayFabResult<GetPlayFabIDsFromOpenIdsResult> { Result = result, CustomData = customData };
1623+
}
1624+
15961625
/// <summary>
15971626
/// Retrieves the unique PlayFab identifiers for the given set of PlayStation :tm: Network identifiers.
15981627
/// </summary>

PlayFabSDK/source/PlayFabClientInstanceAPI.cs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1562,6 +1562,34 @@ public async Task<PlayFabResult<GetPlayFabIDsFromNintendoSwitchDeviceIdsResult>>
15621562
return new PlayFabResult<GetPlayFabIDsFromNintendoSwitchDeviceIdsResult> { Result = result, CustomData = customData };
15631563
}
15641564

1565+
/// <summary>
1566+
/// Retrieves the unique PlayFab identifiers for the given set of OpenId subject identifiers. A OpenId identifier is the
1567+
/// service name plus the service-specific ID for the player, as specified by the title when the OpenId identifier was added
1568+
/// to the player account.
1569+
/// </summary>
1570+
public async Task<PlayFabResult<GetPlayFabIDsFromOpenIdsResult>> GetPlayFabIDsFromOpenIdSubjectIdentifiersAsync(GetPlayFabIDsFromOpenIdsRequest request, object customData = null, Dictionary<string, string> extraHeaders = null)
1571+
{
1572+
await new PlayFabUtil.SynchronizationContextRemover();
1573+
1574+
var requestContext = request?.AuthenticationContext ?? authenticationContext;
1575+
var requestSettings = apiSettings ?? PlayFabSettings.staticSettings;
1576+
if (requestContext.ClientSessionTicket == null) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn, "Must be logged in to call this method");
1577+
1578+
var httpResult = await PlayFabHttp.DoPost("/Client/GetPlayFabIDsFromOpenIdSubjectIdentifiers", request, "X-Authorization", requestContext.ClientSessionTicket, extraHeaders, requestSettings);
1579+
if (httpResult is PlayFabError)
1580+
{
1581+
var error = (PlayFabError)httpResult;
1582+
PlayFabSettings.GlobalErrorHandler?.Invoke(error);
1583+
return new PlayFabResult<GetPlayFabIDsFromOpenIdsResult> { Error = error, CustomData = customData };
1584+
}
1585+
1586+
var resultRawJson = (string)httpResult;
1587+
var resultData = PluginManager.GetPlugin<ISerializerPlugin>(PluginContract.PlayFab_Serializer).DeserializeObject<PlayFabJsonSuccess<GetPlayFabIDsFromOpenIdsResult>>(resultRawJson);
1588+
var result = resultData.data;
1589+
1590+
return new PlayFabResult<GetPlayFabIDsFromOpenIdsResult> { Result = result, CustomData = customData };
1591+
}
1592+
15651593
/// <summary>
15661594
/// Retrieves the unique PlayFab identifiers for the given set of PlayStation :tm: Network identifiers.
15671595
/// </summary>

PlayFabSDK/source/PlayFabClientModels.cs

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2983,6 +2983,28 @@ public class GetPlayFabIDsFromNintendoSwitchDeviceIdsResult : PlayFabResultCommo
29832983

29842984
}
29852985

2986+
public class GetPlayFabIDsFromOpenIdsRequest : PlayFabRequestCommon
2987+
{
2988+
/// <summary>
2989+
/// Array of unique OpenId Connect identifiers for which the title needs to get PlayFab identifiers. The array cannot exceed
2990+
/// 10 in length.
2991+
/// </summary>
2992+
public List<OpenIdSubjectIdentifier> OpenIdSubjectIdentifiers ;
2993+
2994+
}
2995+
2996+
/// <summary>
2997+
/// For OpenId identifiers which have not been linked to PlayFab accounts, null will be returned.
2998+
/// </summary>
2999+
public class GetPlayFabIDsFromOpenIdsResult : PlayFabResultCommon
3000+
{
3001+
/// <summary>
3002+
/// Mapping of OpenId Connect identifiers to PlayFab identifiers.
3003+
/// </summary>
3004+
public List<OpenIdSubjectIdentifierPlayFabIdPair> Data ;
3005+
3006+
}
3007+
29863008
public class GetPlayFabIDsFromPSNAccountIDsRequest : PlayFabRequestCommon
29873009
{
29883010
/// <summary>
@@ -5520,6 +5542,34 @@ public class NintendoSwitchPlayFabIdPair
55205542

55215543
}
55225544

5545+
public class OpenIdSubjectIdentifier
5546+
{
5547+
/// <summary>
5548+
/// The issuer URL for the OpenId Connect provider, or the override URL if an override exists.
5549+
/// </summary>
5550+
public string Issuer ;
5551+
5552+
/// <summary>
5553+
/// The unique subject identifier within the context of the issuer.
5554+
/// </summary>
5555+
public string Subject ;
5556+
5557+
}
5558+
5559+
public class OpenIdSubjectIdentifierPlayFabIdPair
5560+
{
5561+
/// <summary>
5562+
/// Unique OpenId Connect identifier for a user.
5563+
/// </summary>
5564+
public OpenIdSubjectIdentifier OpenIdSubjectIdentifier ;
5565+
5566+
/// <summary>
5567+
/// Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the OpenId Connect identifier.
5568+
/// </summary>
5569+
public string PlayFabId ;
5570+
5571+
}
5572+
55235573
public class OpenTradeRequest : PlayFabRequestCommon
55245574
{
55255575
/// <summary>

PlayFabSDK/source/PlayFabErrors.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -950,6 +950,7 @@ public enum PlayFabErrorCode
950950
UnsupportedEntityType = 23011,
951951
EntityTypeSpecifiedRequiresAggregationSource = 23012,
952952
PlayFabErrorEventNotSupportedForEntityType = 23013,
953+
MetadataLengthExceeded = 23014,
953954
StoreMetricsRequestInvalidInput = 23501,
954955
StoreMetricsErrorRetrievingMetrics = 23502
955956
}

0 commit comments

Comments
 (0)