question

tamcntt1985 avatar image
tamcntt1985 asked

how to config a Bearer Authentication to validate playFab token on server asp.net-core side

Assumably, after using playFab api login, I got the session ticket then I want to use it as a token to access my server side

On my server side, I use asp.net core application I defined an api [Authorize] [GET] function getAbc() { ... }

If I want to request api https://.../getAbc with authorization Bearer [PlayFab Session Ticket]

What should I do at server side?

1. self-define a middleware to validate token with the app (IApplicationBuilder)

2. implement a custom authorization

3. ... (please suggest me some ways to resolve)

apis
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

Actually, it's much simpler than that - just use this API to ask our service about the player: https://api.playfab.com/documentation/server/method/AuthenticateSessionTicket.

10 |1200

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

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.