GOG GALAXY SDK Documentation
|
The interface for handling the user account. More...
#include <IUser.h>
Public Member Functions | |
virtual bool | SignedIn ()=0 |
Checks if the user is signed in to Galaxy. More... | |
virtual GalaxyID | GetGalaxyID ()=0 |
Returns the ID of the user, provided that the user is signed in. More... | |
virtual void | SignInCredentials (const char *login, const char *password, IAuthListener *const listener=NULL)=0 |
Authenticates the Galaxy Peer with specified user credentials. More... | |
virtual void | SignInToken (const char *refreshToken, IAuthListener *const listener=NULL)=0 |
Authenticates the Galaxy Peer with refresh token. More... | |
virtual void | SignInLauncher (IAuthListener *const listener=NULL)=0 |
Authenticates the Galaxy Peer based on launcher authentication. More... | |
virtual void | SignInSteam (const void *steamAppTicket, uint32_t steamAppTicketSize, const char *personaName, IAuthListener *const listener=NULL)=0 |
Authenticates the Galaxy Peer based on Steam Encrypted App Ticket. More... | |
virtual void | SignInGalaxy (bool requireOnline=false, uint32_t timeout=15, IAuthListener *const listener=NULL)=0 |
Authenticates the Galaxy Peer based on Galaxy Client authentication. More... | |
virtual void | SignInPS4 (const char *ps4ClientID, IAuthListener *const listener=NULL)=0 |
Authenticates the Galaxy Peer based on PS4 credentials. More... | |
virtual void | SignInXB1 (const char *xboxOneUserID, IAuthListener *const listener=NULL)=0 |
Authenticates the Galaxy Peer based on XBOX ONE credentials. More... | |
virtual void | SignInXbox (uint64_t xboxID, IAuthListener *const listener=NULL)=0 |
Authenticates the Galaxy Peer based on XBOX GDK credentials. More... | |
virtual void | SignInXBLive (const char *token, const char *signature, const char *marketplaceID, const char *locale, IAuthListener *const listener=NULL)=0 |
Authenticates the Galaxy Peer based on Xbox Live tokens. More... | |
virtual void | SignInAnonymous (IAuthListener *const listener=NULL)=0 |
Authenticates the Galaxy Game Server anonymously. More... | |
virtual void | SignInAnonymousTelemetry (IAuthListener *const listener=NULL)=0 |
Authenticates the Galaxy Peer anonymously. More... | |
virtual void | SignInServerKey (const char *serverKey, IAuthListener *const listener=NULL)=0 |
Authenticates the Galaxy Peer with a specified server key. More... | |
virtual void | SignInAuthorizationCode (const char *authorizationCode, const char *redirectURI, IAuthListener *const listener=NULL)=0 |
Authenticates the Galaxy Peer based on OpenID Connect generated authorization code. More... | |
virtual void | SignOut ()=0 |
Signs the Galaxy Peer out. More... | |
virtual void | RequestUserData (GalaxyID userID=GalaxyID(), ISpecificUserDataListener *const listener=NULL)=0 |
Retrieves/Refreshes user data storage. More... | |
virtual bool | IsUserDataAvailable (GalaxyID userID=GalaxyID())=0 |
Checks if user data exists. More... | |
virtual const char * | GetUserData (const char *key, GalaxyID userID=GalaxyID())=0 |
Returns an entry from the data storage of current user. More... | |
virtual void | GetUserDataCopy (const char *key, char *buffer, uint32_t bufferLength, GalaxyID userID=GalaxyID())=0 |
Copies an entry from the data storage of current user. More... | |
virtual void | SetUserData (const char *key, const char *value, ISpecificUserDataListener *const listener=NULL)=0 |
Creates or updates an entry in the user data storage. More... | |
virtual uint32_t | GetUserDataCount (GalaxyID userID=GalaxyID())=0 |
Returns the number of entries in the user data storage. More... | |
virtual bool | GetUserDataByIndex (uint32_t index, char *key, uint32_t keyLength, char *value, uint32_t valueLength, GalaxyID userID=GalaxyID())=0 |
Returns a property from the user data storage by index. More... | |
virtual void | DeleteUserData (const char *key, ISpecificUserDataListener *const listener=NULL)=0 |
Clears a property of user data storage. More... | |
virtual bool | IsLoggedOn ()=0 |
Checks if the user is logged on to Galaxy backend services. More... | |
virtual void | RequestEncryptedAppTicket (const void *data, uint32_t dataSize, IEncryptedAppTicketListener *const listener=NULL)=0 |
Performs a request for an Encrypted App Ticket. More... | |
virtual void | GetEncryptedAppTicket (void *encryptedAppTicket, uint32_t maxEncryptedAppTicketSize, uint32_t ¤tEncryptedAppTicketSize)=0 |
Returns the Encrypted App Ticket. More... | |
virtual void | CreateOpenIDConnection (const char *secretKey, const char *titleID, const char *connectionID, bool ignoreNonce=true, IPlayFabCreateOpenIDConnectionListener *const listener=NULL)=0 |
Performs a request for a PlayFab's CreateOpenIdConnection. More... | |
virtual void | LoginWithOpenIDConnect (const char *titleID, const char *connectionID, const char *idToken, bool createAccount=true, const char *encryptedRequest=NULL, const char *playerSecret=NULL, IPlayFabLoginWithOpenIDConnectListener *const listener=NULL)=0 |
Performs a request for a PlayFab's LoginWithOpenIdConnect. More... | |
virtual SessionID | GetSessionID ()=0 |
Returns the ID of current session. More... | |
virtual const char * | GetAccessToken ()=0 |
Returns the access token for current session. More... | |
virtual void | GetAccessTokenCopy (char *buffer, uint32_t bufferLength)=0 |
Copies the access token for current session. More... | |
virtual const char * | GetRefreshToken ()=0 |
Returns the refresh token for the current session. More... | |
virtual void | GetRefreshTokenCopy (char *buffer, uint32_t bufferLength)=0 |
Copies the refresh token for the current session. More... | |
virtual const char * | GetIDToken ()=0 |
Returns the id token for the current session. More... | |
virtual void | GetIDTokenCopy (char *buffer, uint32_t bufferLength)=0 |
Copies the id token for the current session. More... | |
virtual bool | ReportInvalidAccessToken (const char *accessToken, const char *info=NULL)=0 |
Reports current access token as no longer working. More... | |
The interface for handling the user account.
|
pure virtual |
Performs a request for a PlayFab's CreateOpenIdConnection.
This call is asynchronous. Responses come to the IPlayFabCreateOpenIDConnectionListener.
[in] | secretKey | This API requires a title secret key, available to title admins, from PlayFab Game Manager. |
[in] | titleID | Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a title has been selected. |
[in] | connectionID | A name for the connection that identifies it within the title. |
[in] | ignoreNonce | Ignore 'nonce' claim in identity tokens. |
|
pure virtual |
Clears a property of user data storage.
This is the same as calling SetUserData() and providing an empty string as the value of the property that is to be altered.
This call in asynchronous. Responses come to the IUserDataListener and ISpecificUserDataListener.
[in] | key | The name of the property of the user data storage. |
[in] | listener | The listener for specific operation. |
|
pure virtual |
Returns the access token for current session.
The access token that is used for the current session might be updated in the background automatically, without any request for that. Each time the access token is updated, a notification comes to the IAccessTokenListener.
|
pure virtual |
Copies the access token for current session.
The access token that is used for the current session might be updated in the background automatically, without any request for that. Each time the access token is updated, a notification comes to the IAccessTokenListener.
[in,out] | buffer | The output buffer. |
[in] | bufferLength | The size of the output buffer. |
|
pure virtual |
Returns the Encrypted App Ticket.
If the buffer that is supposed to take the data is too small, the Encrypted App Ticket will be truncated to its size.
[in,out] | encryptedAppTicket | The buffer for the Encrypted App Ticket. |
[in] | maxEncryptedAppTicketSize | The maximum size of the Encrypted App Ticket buffer. |
[out] | currentEncryptedAppTicketSize | The actual size of the Encrypted App Ticket. |
|
pure virtual |
Returns the ID of the user, provided that the user is signed in.
|
pure virtual |
Returns the id token for the current session.
The id token that is used for the current session might be updated in the background automatically, together with the access token, without any request for that. Each time the access or id token is updated, a notification comes to the IAccessTokenListener.
|
pure virtual |
Copies the id token for the current session.
The id token that is used for the current session might be updated in the background automatically, together with access token, without any request for that. Each time the access or id token is updated, a notification comes to the IAccessTokenListener.
[in,out] | buffer | The output buffer. |
[in] | bufferLength | The size of the output buffer. |
|
pure virtual |
Returns the refresh token for the current session.
The refresh token that is used for the current session might be updated in the background automatically, together with the access token, without any request for that. Each time the access or refresh token is updated, a notification comes to the IAccessTokenListener.
|
pure virtual |
Copies the refresh token for the current session.
The refresh token that is used for the current session might be updated in the background automatically, together with access token, without any request for that. Each time the access or refresh token is updated, a notification comes to the IAccessTokenListener.
[in,out] | buffer | The output buffer. |
[in] | bufferLength | The size of the output buffer. |
|
pure virtual |
Returns the ID of current session.
Returns an entry from the data storage of current user.
[in] | key | The name of the property of the user data storage. |
[in] | userID | The ID of the user. It can be omitted when reading own data. |
|
pure virtual |
Returns a property from the user data storage by index.
[in] | index | Index as an integer in the range of [0, number of entries). |
[in,out] | key | The name of the property of the user data storage. |
[in] | keyLength | The length of the name of the property of the user data storage. |
[in,out] | value | The value of the property of the user data storage. |
[in] | valueLength | The length of the value of the property of the user data storage. |
[in] | userID | The ID of the user. It can be omitted when reading own data. |
|
pure virtual |
Copies an entry from the data storage of current user.
[in] | key | The name of the property of the user data storage. |
[in,out] | buffer | The output buffer. |
[in] | bufferLength | The size of the output buffer. |
[in] | userID | The ID of the user. It can be omitted when reading own data. |
Returns the number of entries in the user data storage.
[in] | userID | The ID of the user. It can be omitted when reading own data. |
|
pure virtual |
Checks if the user is logged on to Galaxy backend services.
Checks if user data exists.
[in] | userID | The ID of the user. It can be omitted when checking for own data. |
|
pure virtual |
Performs a request for a PlayFab's LoginWithOpenIdConnect.
This call is asynchronous. Responses come to the IPlayFabLoginWithOpenIDConnectListener.
[in] | titleID | Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a title has been selected. |
[in] | connectionID | A name that identifies which configured OpenID Connect provider relationship to use. |
[in] | idToken | The JSON Web token (JWT) returned by the identity provider after login. |
[in] | createAccount | Automatically create a PlayFab account if one is not currently linked to this ID. |
[in] | encryptedRequest | Base64 encoded body that is encrypted with the Title's public RSA key (Enterprise Only). |
[in] | playerSecret | Player secret that is used to verify API request signatures (Enterprise Only). |
|
pure virtual |
Reports current access token as no longer working.
This starts the process of refreshing access token, unless the process is already in progress. The notifications come to IAccessTokenListener.
[in] | accessToken | The invalid access token. |
[in] | info | Additional information, e.g. the URI of the resource it was used for. |
|
pure virtual |
Performs a request for an Encrypted App Ticket.
This call is asynchronous. Responses come to the IEncryptedAppTicketListener.
[in] | data | The additional data to be placed within the Encrypted App Ticket with the limit of 1023 bytes. |
[in] | dataSize | The size of the additional data. |
[in] | listener | The listener for specific operation. |
|
pure virtual |
Retrieves/Refreshes user data storage.
This call is asynchronous. Responses come to the IUserDataListener and ISpecificUserDataListener.
[in] | userID | The ID of the user. It can be omitted when requesting for own data. |
[in] | listener | The listener for specific operation. |
|
pure virtual |
Creates or updates an entry in the user data storage.
This call in asynchronous. Responses come to the IUserDataListener and ISpecificUserDataListener.
[in] | key | The name of the property of the user data storage with the limit of 1023 bytes. |
[in] | value | The value of the property to set with the limit of 4095 bytes. |
[in] | listener | The listener for specific operation. |
|
pure virtual |
Checks if the user is signed in to Galaxy.
The user should be reported as signed in as soon as the authentication process is finished.
If the user is not able to sign in or gets signed out, there might be either a networking issue or a limited availability of Galaxy backend services.
After loosing authentication the user needs to sign in again in order for the Galaxy Peer to operate.
|
pure virtual |
Authenticates the Galaxy Game Server anonymously.
This call is asynchronous. Responses come to the IAuthListener (for all GlobalAuthListener-derived and optional listener passed as argument).
[in] | listener | The listener for specific operation. |
|
pure virtual |
Authenticates the Galaxy Peer anonymously.
This authentication method enables the peer to send anonymous telemetry events.
This call is asynchronous. Responses come to the IAuthListener (for all GlobalAuthListener-derived and optional listener passed as argument).
[in] | listener | The listener for specific operation. |
|
pure virtual |
Authenticates the Galaxy Peer based on OpenID Connect generated authorization code.
This call is asynchronous. Responses come to the IAuthListener (for all GlobalAuthListener-derived and optional listener passed as argument).
[in] | authorizationCode | Authorization code aquired from auth service. |
[in] | redirectURI | URL to be redirected to with user code parameter added. |
[in] | listener | The listener for specific operation. |
|
pure virtual |
Authenticates the Galaxy Peer with specified user credentials.
This call is asynchronous. Responses come to the IAuthListener (for all GlobalAuthListener-derived and optional listener passed as argument).
[in] | login | The user's login. |
[in] | password | The user's password. |
[in] | listener | The listener for specific operation. |
|
pure virtual |
Authenticates the Galaxy Peer based on Galaxy Client authentication.
This call is asynchronous. Responses come to the IAuthListener (for all GlobalAuthListener-derived and optional listener passed as argument).
[in] | requireOnline | Indicates if sign in with Galaxy backend is required. |
[in] | timeout | Time in seconds for AuthListener to trigger timeout |
[in] | listener | The listener for specific operation. |
|
pure virtual |
Authenticates the Galaxy Peer based on launcher authentication.
This call is asynchronous. Responses come to the IAuthListener (for all GlobalAuthListener-derived and optional listener passed as argument).
[in] | listener | The listener for specific operation. |
|
pure virtual |
Authenticates the Galaxy Peer based on PS4 credentials.
This call is asynchronous. Responses come to the IAuthListener (for all GlobalAuthListener-derived and optional listener passed as argument).
[in] | ps4ClientID | The PlayStation 4 client ID. |
[in] | listener | The listener for specific operation. |
|
pure virtual |
Authenticates the Galaxy Peer with a specified server key.
This call is asynchronous. Responses come to the IAuthListener.
[in] | serverKey | The server key. |
[in] | listener | The listener for specific operation. |
|
pure virtual |
Authenticates the Galaxy Peer based on Steam Encrypted App Ticket.
This call is asynchronous. Responses come to the IAuthListener (for all GlobalAuthListener-derived and optional listener passed as argument).
[in] | steamAppTicket | The Encrypted App Ticket from the Steam API. |
[in] | steamAppTicketSize | The size of the ticket. |
[in] | personaName | The user's persona name, i.e. the username from Steam. |
[in] | listener | The listener for specific operation. |
|
pure virtual |
Authenticates the Galaxy Peer with refresh token.
This call is asynchronous. Responses come to the IAuthListener (for all GlobalAuthListener-derived and optional listener passed as argument).
This method is designed for application which renders Galaxy login page in its UI and obtains refresh token after user login.
[in] | refreshToken | The refresh token obtained from Galaxy login page. |
[in] | listener | The listener for specific operation. |
|
pure virtual |
Authenticates the Galaxy Peer based on XBOX ONE credentials.
This call is asynchronous. Responses come to the IAuthListener (for all GlobalAuthListener-derived and optional listener passed as argument).
[in] | xboxOneUserID | The XBOX ONE user ID. |
[in] | listener | The listener for specific operation. |
|
pure virtual |
Authenticates the Galaxy Peer based on Xbox Live tokens.
This call is asynchronous. Responses come to the IAuthListener (for all GlobalAuthListener-derived and optional listener passed as argument).
[in] | token | The XSTS token. |
[in] | signature | The digital signature for the HTTP request. |
[in] | marketplaceID | The Marketplace ID |
[in] | locale | The user locale (example values: EN-US, FR-FR). |
[in] | listener | The listener for specific operation. |
|
pure virtual |
Authenticates the Galaxy Peer based on XBOX GDK credentials.
This call is asynchronous. Responses come to the IAuthListener (for all GlobalAuthListener-derived and optional listener passed as argument).
[in] | xboxID | The XBOX user ID. |
[in] | listener | The listener for specific operation. |
|
pure virtual |
Signs the Galaxy Peer out.
This call is asynchronous. Responses come to the IAuthListener and IOperationalStateChangeListener.