question

robert avatar image
robert asked

Invalidate Session Ticket

For our fully automated multiplayer tests (photon + play fab) we would like to test expired session tickets.

We have for example 32 clients running, fully automated menu navigation, item purchasing, game joining, playing, leaving, reconnecting, emulating photon disconnects, etc... Now we would like to handle the possible case that a playfab sessions ticket expires or gets invalid for any reason.

We could of course manually simulate this in each and every playfab function we call, but hoped there is a method to just invalidate it so that all methods and playfab internal just fail as they would actually do in real world. (we would invalidate the ticket after random x seconds after logging in)

Is there something available already to achieve this? (just locally, just for the logged in player)

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

Currently, your best bet would be to just get a session ticket and let it expire (after 24 hours). We'll be updating later on with the ability to "sign out", invalidating a session ticket, but right now each one is good for the full 24 hour period.

8 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

robert avatar image robert commented ·

I think we will miss the release window by 27 years if we wait for 24 hours for each test case ;)

Anyway, we will simulate an expired session ticket locally, thanks!

0 Likes 0 ·
brendan avatar image brendan robert commented ·

Actually, I meant that you could generate a set of accounts and session tickets today, let them expire, and use them in your tests going forward. But simulating expiration would work fine, as well - whatever works best for you.

0 Likes 0 ·
robert avatar image robert brendan commented ·

Yes, thanks, this will work for a very limited test. But what we actually would like to simulate is that the session ticket gets invalid in every possible situation. In the middle of a game, while opening the leaderboard, while purchasing an item, while query player data, etc...

For instance, for Photon we simulate around 25.000 random disconnects per day on all running test clients in every possible situation, (basically just injecting a disconnect call randomly) and make sure that the game recovers nicely.

0 Likes 0 ·
Show more comments
Roshaan avatar image Roshaan commented ·

@Brendan did you guys added the "sign out" feature yet? or it's still on To-do list? Because I need to logout the user for some reason from my game after doing some email verification.

0 Likes 0 ·
brendan avatar image brendan Roshaan commented ·

That's part of why we're moving to the Entity model - so that we can provide for session tokens. Once we have the Entity system fully in place and we start encouraging everyone to move to it, we'll be looking at adding this. But right now, all you really need to do is just delete the local Session Ticket you got back from the service. That would prevent the client from being able to make any calls as the user.

0 Likes 0 ·
Roshaan avatar image Roshaan brendan commented ·

How can I delete the local Session Ticket? Where are you guys storing it?

0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.