qResult RequestAuthenticationToken( ProtocolCallContext * pContext, qUnsignedInt32 gameServerId, const qChar8 * pKeyHash, qChar8 * pAuthToken, qBool checkParentalControl = true );
Name | Description | |
---|---|---|
in | pContext | The call context. |
in | gameServerId | Game server ID. |
in | pKeyHash | Key hash value. |
out | pAuthToken | Authentication token receive buffer. The buffer size must be at least AUTH_TOKEN_SIZE . |
in | checkParentalControl | Whether to check Parental Controls. |
Value | Description |
---|---|
QSUCCESS(Core,Success) | Successfully started process. |
QERROR(Core,InvalidArgument) | Invalid argument. |
QERROR(Core,CallInitiationFailure) | Invalid CallContext state. |
QERROR(FPD,NotInitialized) | The friend library is not initialized. |
QERROR(FPD,NotConnected) | Not logged in to NFS. (If using SDK versions prior to SDK 3.2.) |
Requests an independent server's authentication token.
Gets an authentication token after authenticating the game to the authentication server. If the system has not obtained a principal ID, this function accesses the friend server and obtains a principal ID during the asynchronous processes in the function.
This function calls nn::friends
library asynchronous processes internally by the library. While the asynchronous processing of this function is taking place, do not call the nn::friends::Login
function or any other nn::friends
library asynchronous processes.
Use the CallContext::GetOutcome
function to determine whether the asynchronous processing results indicate success or failure. If a failure, use the GetLastErrorCode
function to get the network error code.
When checkParentalControl is set to false
, the Online Interaction restriction of the Parental Controls is not checked. For this reason, configure this setting to correctly reflect the nature of the service.
QRESULT_SUCCESS
and QRESULT_ERROR
return values to QSUCCESS
and QERROR
.
nn::friends
library.CONFIDENTIAL