The following diagram illustrates the MG+ system:
The MG+ platform includes the following components:
-
STS (Secure Token Service): web service responsible for authentication and authorization for MG+ systems.
-
K2 API: API for agents’ integration with MG+ systems.
-
Products: game products available on the MG+ platform.
This document describes the API calls required for operations between the agent backend and MG+ Common Wallet APIs.
Diagram of Sample Player Flow
API Call Flow
In authentication, when the user successfully logs in using their credentials, a JSON Web Token (JWT) will be returned and must be saved locally (See Recommended Token Refresh Policy under the STS - Secure Token Service section for additional details).
Whenever the user wants to access a protected route or resource, the user agent should send the JWT, typically in the Authorization header using the Bearer schema. The content of the header should look like the following:
Authorization: Bearer <token>
The K2 API server’s protected routes will check for a valid JWT in the Authorization header, and if it’s present, the user will be allowed to access the protected resources.
You can find more information about JWT at https://jwt.io/
The following diagram shows the entire process of the K2 API call and JWT renewal.
This is just an example of the suggested flow where once an active token is available, the process splits into two parallel executions: API call and JWT renewal.