Mojang / AccountsClient

Java client for accessing Mojang's account/profile API
115 stars 37 forks source link

Expand API to check for paid account #4

Open Black-Hole opened 10 years ago

Black-Hole commented 10 years ago

Currently the API don't return a result for unpaid accounts. It would be nice to still get the result, but an additional field with the current paid status.

The problem is that are users registered to my server, that had once a paid account. Later Mojang marked the payment as invalid. If these users use another gift code, they'll have a paid account again and could join my server.

If in the future it will be possible to change usernames, there is no way to track if the users with an empty ID are the same users.

So it should be possible to get the IDs of the unpaid accounts, too. Those IDs are bound to the account and doesn't change with the current payment status.

jomo commented 10 years ago

AFAIK unpaid accounts can no longer have a username. I'm quite sure that you can only pick a username after you bought the game.

Might make some sense for the rare chance that accounts are cancelled either by a user or by Mojang, though.

Black-Hole commented 10 years ago

I know of some users that simply used a new gift code to unlock their account again. Also you could upgrade your old unpaid account anytime.

jomo commented 10 years ago

About the unpaid accounts: Mojang has announced that registered but unpaid usernames will be withdrawn. I bet this will happen before name changing is enabled.

nightpool commented 10 years ago

Some usernames are returned as a "demo" (unpaid) account. Does that satisfy this ticket? (See jomo's docs)

jomo commented 10 years ago

@nightpool the (as of today) old method returns "demo" accounts, the newer one does not.

Black-Hole commented 10 years ago

No, since no profile is found for revoked payments. These users once had a paid account and these uuids were returned: luisfritzi a09875e4-4eff-464d-8ddd-ab337995eb89 Juli180702 de506882-4d36-4143-acb3-2ebc656ff970 michiundsimon 4604c573-273d-4d51-8c66-ef1b1c23891c bsg4ever95 19e0ccc2-6f3e-42bd-aad7-7dea850f1740 RocketFlying 436924e1-8621-46e6-9337-a7b670137303 marvinfabig ffb1a299-5cda-4cf3-a314-4a31c4690823

Once they pay again for their account, these UUIDs will be used again.

nightpool commented 10 years ago

That sucks. On Apr 14, 2014 4:53 PM, "Black-Hole" notifications@github.com wrote:

No, since no profile is found for revoked payments. These users once had a paid account and these uuids were returned: luisfritzi a09875e4-4eff-464d-8ddd-ab337995eb89 Juli180702 de506882-4d36-4143-acb3-2ebc656ff970 michiundsimon 4604c573-273d-4d51-8c66-ef1b1c23891c bsg4ever95 19e0ccc2-6f3e-42bd-aad7-7dea850f1740 RocketFlying 436924e1-8621-46e6-9337-a7b670137303 marvinfabig ffb1a299-5cda-4cf3-a314-4a31c4690823

Once they pay again for their account, these UUIDs will be used again.

— Reply to this email directly or view it on GitHubhttps://github.com/Mojang/AccountsClient/issues/4#issuecomment-40423047 .

jomo commented 10 years ago

Indeed these accounts are very weird. Example with luisfritzi: https://sessionserver.mojang.com/session/minecraft/profile/a09875e44eff464d8dddab337995eb89 returns:

{
  "id": "a09875e44eff464d8dddab337995eb89",
  "name": "luisfritzi",
  "properties": [
    {
      "name": "textures",
      "value": {
        "timestamp": 1397513368690,
        "profileId": "a09875e44eff464d8dddab337995eb89",
        "profileName": "luisfritzi",
        "isPublic": true,
        "textures": {}
      },
      "signature": "DVjUM2/yFgLs9IG1ylAEjmPzCu3svZVwehV1S8g7wjCVT9sjC9M/VSMmjFKj7pfUCE6tHPsplGq8uA7EzZZnlzAnUwxITP9LK1KVhCVB6gT+GjuAx4bMSc7QEr3PjkhnB0ZekkxlFCREHi9v3kwfhzjxSPU/2trJ2EKrEFANyTGgroeAHwz7Sf7QdrTyf1sToMT8QyhQayYEWQTvhc1huJxQudoanMvunMLL3IZMATVV87h1AXpuBGwnpV9iZYa/sf0E4IhbpRcV0ClUgvBc9TJnUsN0nvZZ0xMK7t0b0vkenZQPumhyyl1rUwXQK1UjNqHNUVBg/efgSciOe3tSJjty6cj1bJ8RaEOLqsXmcGCTQhFbrN9Mv39W86KOeFIF+netzsW7IIvvBNeM/mvb0Z/SqoZsAIFLHJB8keWcCkGfWqzVjq8kQy8mvVG6wfok1AzamE4XzLvvgLphdnVls7TAlAxbt+R11+OhO23XRV+4u5Qcvlk50H91qjdONUs50IZR5IRTmgVZPG+FoHKSWS/aHaEw4G2XPFGCAD6MAOCPoILbUUVUqElGI0nvAv36pMEpsMOYb16LweJfkwgO9we7onu4uhYBrSdCipDjhwopfmt8JfsUgyXTsn0mgw9EWwO9WQ51TSPh4LVVwja3aYQ/Ecn0uUtx3TZBckLSvqI="
    }
  ]
}

Notice how there's neither legacy nor demo in the object, meaning this should be a valid account.

However name -> uuid brings up no results.