<< Back to Programming Forum   Search

Posts 1 - 5 of 5   
Api Token conundrum: 3/4/2015 17:04:25


Deadman 
Level 64
Report
Currently the starter code, does the following when a new player joins. It gets the api token for a player, and if they do not exist in the db, a new player is created.

If they do exist, they are already "known" to the CLOT.

Now consider a scenario where a player has changed his api token(through a password change).
This player will always be considered a new player going forward and my CLOT would behave accordingly.

How do I prevent this from happening? Seems like the Player model is a bit incomplete.

How do you handle name changes on Warlight, Fizzer? You must have a different player model surely? What is the unique identifier for a player, given that name, inviteToken(i.e a representation of password) and emailId are all subject to change?
Api Token conundrum: 3/4/2015 17:32:58

Fizzer 
Level 64

Warzone Creator
Report
It sounds like you're confusing API token with a player token.

The API token is a secret value. You only ever know your own API token, and should never reveal it to anyone. This changes if you change your password, for security reasons.

The player token uniquely identifies a player and never changes. It's public information -- you'll know your own player token as well as the player token of anyone else.
Api Token conundrum: 3/4/2015 18:32:19


Deadman 
Level 64
Report
Ah.. Now it makes sense. I'll try it out later tonight.

So to deal with name changes, I just have to update my player attributes on every cron run for existing players as well.




EDIT : It works as expected. Thanks for the explanation :)

Edited 3/5/2015 07:31:45
Api Token conundrum: 3/5/2015 06:27:50


Thomas 633
Level 56
Report
this is the first CLOT in about six months
Api Token conundrum: 3/5/2015 06:54:23


Deadman 
Level 64
Report
Well then it better make an impression eh? :P
Posts 1 - 5 of 5