LootLocker Unreal SDK 11.1.0
Game backend SDK for Unreal Engine
Loading...
Searching...
No Matches
Identity

Detailed Description

Work with the cross-game identity behind a player's sessions.

An identity is the human behind one or more player accounts in a publisher, shared across every game that publisher owns. Use the identity methods to read the identity a session is linked to, look identities up, record a provider credential against an identity, and preview or execute a merge of two identities that turn out to belong to the same person.

Merging is destructive and never happens automatically: LootLocker returns the games in which both identities have a live player and the calling code must choose which player to keep in each.

Typedef Documentation

◆ FLootLockerIdentityLinkResponseDelegate

typedef void(* FLootLockerIdentityLinkResponseDelegate) (FLootLockerIdentityLinkResponse)

C++ response delegate for linking a provider credential.

◆ FLootLockerIdentityLookupResponseDelegate

typedef void(* FLootLockerIdentityLookupResponseDelegate) (FLootLockerIdentityLookupResponse)

C++ response delegate for looking identities up.

◆ FLootLockerIdentityMergePreviewResponseDelegate

typedef void(* FLootLockerIdentityMergePreviewResponseDelegate) (FLootLockerIdentityMergePreviewResponse)

C++ response delegate for previewing an identity merge.

◆ FLootLockerIdentityMergeResponseDelegate

typedef void(* FLootLockerIdentityMergeResponseDelegate) (FLootLockerIdentityMergeResponse)

C++ response delegate for merging identities.

◆ FLootLockerIdentityResponseDelegate

typedef void(* FLootLockerIdentityResponseDelegate) (FLootLockerIdentityResponse)

C++ response delegate for reading the current identity.

Enumeration Type Documentation

◆ ELootLockerIdentityProvider

enum class ELootLockerIdentityProvider : uint8
strong

Platforms that can be presented as a credential when linking a provider to an identity.

The enumerator names are the wire values the backend accepts, so they are sent as-is. These are the platform catalog slugs used by LootLocker, which are not the same catalogue as ELootLockerAccountProvider.

Always send the canonical enumerator when linking. The backend accepts the aliases "ios", "android" and "luna" and stores whichever form was sent, but a stored alias resolves to Unknown because this SDK only maps canonical slugs.

Enumerator
Unknown 

A provider this SDK does not recognise, or one the response did not populate.

Zero on purpose: an unpopulated or unparseable value must not land on a real provider.

Steam 
Psn 
Apple_app_store 
Google_play_store 
Xbox_one 
Nintendo_switch 
Amazon_luna 
White_label_login 
Guest 
Apple_sign_in 
Google_sign_in 
Epic_games 
Apple_game_center 
Meta 
Lootlocker_delegation 
Twitch 
Google_play_games 
Discord 
Publisher_account 

A publisher account credential (email).

Every identity created through publisher sign-in carries one, so it appears in the provider list. It is not linkable through the link endpoint.

Function Documentation

◆ GetIdentity()

FString ULootLockerSDKManager::GetIdentity ( const FLootLockerIdentityResponseDelegate & OnCompletedRequest,
const FString & ForPlayerWithUlid = "" )
static

Get the identity the current session is linked to, including the publisher it belongs to, the provider credentials linked to it and, when populated, the games it has been active in.

The Providers list carries the credential ids that UnlinkProvider takes; the provider's own user identifier is deliberately not returned. Each entry's Provider_type is resolved from its Provider slug, and is Unknown for a slug this SDK does not map.

The session must be linked to an identity; a session that is not is answered with 403.

Parameters
OnCompletedRequestDelegate for handling the server response
ForPlayerWithUlidOptional: Execute for the specified player ULID (default player if empty)
Returns
A unique id for this request, use this to match callbacks to requests when you have multiple simultaneous requests outbound

◆ LinkProvider()

FString ULootLockerSDKManager::LinkProvider ( const FLootLockerIdentityLinkRequest & Request,
const FLootLockerIdentityLinkResponseDelegate & OnCompletedRequest,
const FString & ForPlayerWithUlid = "" )
static

Record a provider credential against the identity of the current session, so a later session presenting the same credential resolves to this identity instead of minting a second one.

Linking is idempotent: a credential this identity already owns answers created = false. When another identity in the publisher owns the credential the call answers 409 and links nothing; the merge offer is surfaced on the response's Conflict field and can be resolved with MergeIdentities. LootLocker never links a credential across identities on the player's behalf.

The backend stores the provider slug exactly as it is sent, so always send the canonical enumerator; sending an alias would make the stored slug differ from what GetIdentity reports for other credentials of the same provider. Unknown is rejected before the request is sent.

Parameters
RequestThe link request
OnCompletedRequestDelegate for handling the server response
ForPlayerWithUlidOptional: Execute for the specified player ULID (default player if empty)
Returns
A unique id for this request, use this to match callbacks to requests when you have multiple simultaneous requests outbound

◆ LookupIdentities()

FString ULootLockerSDKManager::LookupIdentities ( const FLootLockerIdentityLookupRequest & Request,
const FLootLockerIdentityLookupResponseDelegate & OnCompletedRequest,
const FString & ForPlayerWithUlid = "" )
static

Look up identities by id and/or by the games they have been active in.

At least one of the two filters must be supplied. Results are always scoped to the caller's publisher.

Parameters
RequestThe lookup request
OnCompletedRequestDelegate for handling the server response
ForPlayerWithUlidOptional: Execute for the specified player ULID (default player if empty)
Returns
A unique id for this request, use this to match callbacks to requests when you have multiple simultaneous requests outbound

◆ MergeIdentities()

FString ULootLockerSDKManager::MergeIdentities ( const FLootLockerIdentityMergeRequest & Request,
const FLootLockerIdentityMergeResponseDelegate & OnCompletedRequest,
const FString & ForPlayerWithUlid = "" )
static

Merge another identity into the current one, keeping the current identity.

The merged identity is tombstoned, its credentials and player links move to the kept identity, and its sessions are revoked. Every game in which both identities have a live player must carry a resolution naming the player to keep; the other player of that game is soft-deleted. A missing or invalid resolution answers 400 and writes nothing.

This is destructive and never runs automatically. Get the conflicts from PreviewIdentityMerge (or from the conflict of LinkProvider) and let the player choose.

Parameters
RequestThe merge request
OnCompletedRequestDelegate for handling the server response
ForPlayerWithUlidOptional: Execute for the specified player ULID (default player if empty)
Returns
A unique id for this request, use this to match callbacks to requests when you have multiple simultaneous requests outbound

◆ PreviewIdentityMerge()

FString ULootLockerSDKManager::PreviewIdentityMerge ( const FString & MergeIdentityId,
const FLootLockerIdentityMergePreviewResponseDelegate & OnCompletedRequest,
const FString & ForPlayerWithUlid = "" )
static

See what merging another identity into the current one would resolve, without executing anything.

Use it to show the player the games in which both identities have a live player before calling MergeIdentities. An empty Player_conflicts array means the merge needs no choice. Both identities must belong to the same publisher.

Parameters
MergeIdentityIdThe ULID of the identity to merge into the authenticated identity
OnCompletedRequestDelegate for handling the server response
ForPlayerWithUlidOptional: Execute for the specified player ULID (default player if empty)
Returns
A unique id for this request, use this to match callbacks to requests when you have multiple simultaneous requests outbound

◆ UnlinkProvider()

FString ULootLockerSDKManager::UnlinkProvider ( const FString & CredentialId,
const FLootLockerDefaultDelegate & OnCompletedRequest,
const FString & ForPlayerWithUlid = "" )
static

Remove a provider credential from the current identity.

Get the credential id from the Providers list of GetIdentity. The provider's own user identifier is never returned, so the id is the only reference available to a game client.

The last remaining credential cannot be removed, because the identity would become unreachable; that case is answered with 422.

Parameters
CredentialIdThe ULID of the credential to remove
OnCompletedRequestDelegate for handling the server response
ForPlayerWithUlidOptional: Execute for the specified player ULID (default player if empty)
Returns
A unique id for this request, use this to match callbacks to requests when you have multiple simultaneous requests outbound

Typedefs

typedef void(* FLootLockerIdentityResponseDelegate) (FLootLockerIdentityResponse)
 C++ response delegate for reading the current identity.
typedef void(* FLootLockerIdentityLookupResponseDelegate) (FLootLockerIdentityLookupResponse)
 C++ response delegate for looking identities up.
typedef void(* FLootLockerIdentityLinkResponseDelegate) (FLootLockerIdentityLinkResponse)
 C++ response delegate for linking a provider credential.
typedef void(* FLootLockerIdentityMergePreviewResponseDelegate) (FLootLockerIdentityMergePreviewResponse)
 C++ response delegate for previewing an identity merge.
typedef void(* FLootLockerIdentityMergeResponseDelegate) (FLootLockerIdentityMergeResponse)
 C++ response delegate for merging identities.

Enumerations

enum class  ELootLockerIdentityProvider : uint8 {
  ELootLockerIdentityProvider::Unknown = 0 , ELootLockerIdentityProvider::Steam = 1 , ELootLockerIdentityProvider::Psn = 2 , ELootLockerIdentityProvider::Apple_app_store = 3 ,
  ELootLockerIdentityProvider::Google_play_store = 4 , ELootLockerIdentityProvider::Xbox_one = 5 , ELootLockerIdentityProvider::Nintendo_switch = 6 , ELootLockerIdentityProvider::Amazon_luna = 7 ,
  ELootLockerIdentityProvider::White_label_login = 8 , ELootLockerIdentityProvider::Guest = 9 , ELootLockerIdentityProvider::Apple_sign_in = 10 , ELootLockerIdentityProvider::Google_sign_in = 11 ,
  ELootLockerIdentityProvider::Epic_games = 12 , ELootLockerIdentityProvider::Apple_game_center = 13 , ELootLockerIdentityProvider::Meta = 14 , ELootLockerIdentityProvider::Lootlocker_delegation = 15 ,
  ELootLockerIdentityProvider::Twitch = 16 , ELootLockerIdentityProvider::Google_play_games = 17 , ELootLockerIdentityProvider::Discord = 18 , ELootLockerIdentityProvider::Publisher_account = 19
}
 Platforms that can be presented as a credential when linking a provider to an identity. More...

Functions

static FString ULootLockerSDKManager::GetIdentity (const FLootLockerIdentityResponseDelegate &OnCompletedRequest, const FString &ForPlayerWithUlid="")
 Get the identity the current session is linked to, including the publisher it belongs to, the provider credentials linked to it and, when populated, the games it has been active in.
static FString ULootLockerSDKManager::LookupIdentities (const FLootLockerIdentityLookupRequest &Request, const FLootLockerIdentityLookupResponseDelegate &OnCompletedRequest, const FString &ForPlayerWithUlid="")
 Look up identities by id and/or by the games they have been active in.
static FString ULootLockerSDKManager::LinkProvider (const FLootLockerIdentityLinkRequest &Request, const FLootLockerIdentityLinkResponseDelegate &OnCompletedRequest, const FString &ForPlayerWithUlid="")
 Record a provider credential against the identity of the current session, so a later session presenting the same credential resolves to this identity instead of minting a second one.
static FString ULootLockerSDKManager::UnlinkProvider (const FString &CredentialId, const FLootLockerDefaultDelegate &OnCompletedRequest, const FString &ForPlayerWithUlid="")
 Remove a provider credential from the current identity.
static FString ULootLockerSDKManager::PreviewIdentityMerge (const FString &MergeIdentityId, const FLootLockerIdentityMergePreviewResponseDelegate &OnCompletedRequest, const FString &ForPlayerWithUlid="")
 See what merging another identity into the current one would resolve, without executing anything.
static FString ULootLockerSDKManager::MergeIdentities (const FLootLockerIdentityMergeRequest &Request, const FLootLockerIdentityMergeResponseDelegate &OnCompletedRequest, const FString &ForPlayerWithUlid="")
 Merge another identity into the current one, keeping the current identity.