public void Set(CopyUserAuthTokenOptions other) { if (other != null) { m_ApiVersion = AuthInterface.CopyuserauthtokenApiLatest; } }
/// <summary> /// Fetches a user auth token for an Epic Online Services Account ID. /// <seealso cref="Release" /> /// </summary> /// <param name="options">Structure containing the api version of CopyUserAuthToken to use</param> /// <param name="localUserId">The Epic Online Services Account ID of the user being queried</param> /// <param name="outUserAuthToken">The auth token for the given user, if it exists and is valid; use <see cref="Release" /> when finished</param> /// <returns> /// <see cref="Result.Success" /> if the information is available and passed out in OutUserAuthToken /// <see cref="Result.InvalidParameters" /> if you pass a null pointer for the out parameter /// <see cref="Result.NotFound" /> if the auth token is not found or expired. /// </returns> public Result CopyUserAuthToken(CopyUserAuthTokenOptions options, EpicAccountId localUserId, out Token outUserAuthToken) { System.IntPtr optionsAddress = new System.IntPtr(); Helper.TryMarshalSet <CopyUserAuthTokenOptionsInternal, CopyUserAuthTokenOptions>(ref optionsAddress, options); var localUserIdInnerHandle = System.IntPtr.Zero; Helper.TryMarshalSet(ref localUserIdInnerHandle, localUserId); var outUserAuthTokenAddress = System.IntPtr.Zero; var funcResult = EOS_Auth_CopyUserAuthToken(InnerHandle, optionsAddress, localUserIdInnerHandle, ref outUserAuthTokenAddress); Helper.TryMarshalDispose(ref optionsAddress); if (Helper.TryMarshalGet <TokenInternal, Token>(outUserAuthTokenAddress, out outUserAuthToken)) { EOS_Auth_Token_Release(outUserAuthTokenAddress); } return(funcResult); }