Skip to main content

Class: SignedPlayerInfo

Represents player info in a secure way, encrypted by the server side of the platform hosting the game. Game server can decrypt this info on to verify if this is data is really sent from the platform.

Methods

getPlayerID

getPlayerID(): string

Get the player's ID

Example

LinkGame.player.getSignedPlayerInfoAsync('some_metadata')
* .then(function (result) {
* result.getPlayerID(), // same value as LinkGame.player.getID()
* })
* ```

#### Returns

`string`

Player ID

#### Defined in

[models/signed-player-info.ts:32](https://github.com/rakuten-games/link-game-sdk/blob/bd6a2e2/src/models/signed-player-info.ts#L32)

___

### getSignature

▸ **getSignature**(): `string`

Get the signature string

**`Example`**

LinkGame.player.getSignedPlayerInfoAsync('some_metadata')

  • .then(function (result) {
  • result.getSignature() // some string like this, 'S0M3_5igNatvR3.eyJpc3N1ZWRfYXQiOiAxNTM5OTMxNDQ2LCAicGxheWVyX2lkIjogIjgwZDU4N2UyODkzNjdlNTVhZjRhNGQ0OTIyOThkNmRkNDdjMGFiYmMyMjc1YjNjMDQ0ODkyMTY2ZGE3MzM5NmYiLCAiYWxnb3JpdGhtIjogIkhNQUMtU0hBMjU2IiwgInJlcXVlc3RfcGF5bG9hZCI6ICJteV9tZXRhZGF0YSJ9'
  • })

Returns

string

Signature of player info

Defined in

models/signed-player-info.ts:47