code-disaster / steamworks4j

A thin Java wrapper to access the Steamworks API
https://code-disaster.github.io/steamworks4j/
MIT License
468 stars 64 forks source link

Should Update de Steam SDK? #125

Closed sebaber closed 1 year ago

sebaber commented 1 year ago

Hi!

Today i receive an email from steampublish@valvesoftware.com that advice us to update the Steam SDK if the game use ISteamUser::GetAuthSessionTicket(), that i think is the case because we use public SteamAuthTicket getAuthSessionTicket(ByteBuffer authTicket, int[] sizeInBytes) throws SteamException in some cases.

If this is the case, we can give a hand to colaborate to this migrations if it is neccesary.

Thanks for the time and for this awesome Wrapper for JAVA of Steam SDK!

code-disaster commented 1 year ago

f69b809 adds getAuthTicketForWebApi(), if this is what you are asking about.

sebaber commented 1 year ago

Yeah that is what im looking for! Thanks a lot for the fast response! Appreciate a lot!

sebaber commented 1 year ago

I could found the new method in the SNAPSHOT, but idk if im using well, because i could not found a way to get the ticket that should give me for the user to authenticate. There is something else that i am missing?

code-disaster commented 1 year ago

It is returned in the new callback. See https://github.com/code-disaster/steamworks4j/blob/master/tests/src/main/java/com/codedisaster/steamworks/test/SteamClientAPITest.java#L43.

Note that you need to copy the data, the byte[] array will point to invalid memory after the callback returns.

Zomis commented 1 year ago

@code-disaster I don't know if I'm doing anything wrong, trying to copy the old library loader and use it (see #127), but I'm not getting the onGetTicketForWebApi callback.

I just get an integer (incrementing from 1 or 2 or something) in response to SteamUser.getAuthTicketForWebApi(), but the callback is never triggered? (And yes, I am running SteamAPI.runCallbacks())

code-disaster commented 1 year ago

Not sure about that, but is it possible that you have some old version of the steamworks4j DLL lingering and getting picked up by the library loader somewhere?

sebaber commented 1 year ago

It is returned in the new callback. See https://github.com/code-disaster/steamworks4j/blob/master/tests/src/main/java/com/codedisaster/steamworks/test/SteamClientAPITest.java#L43.

Note that you need to copy the data, the byte[] array will point to invalid memory after the callback returns.

Yeah that was i am looking for! It has to be asynchronic i did not realize that. Getting that hexa array of bytes and passing as string to my server works perfect! TSM for the help! i will close this issue.

Frotty commented 5 months ago

@sebaber How did you get this to work? In my case the callback is not triggered (#143)