Auth Plugin requirements
Description and requirements of a user authentication plugin.
New integrations should use Pango Auth instead.
Pango Auth provides managed user authentication without requiring you to deploy and maintain your own authentication server. See the Authentication documentation for implementation details.
The custom plugin approach described below is only supported for existing partners with legacy integrations.
You need a plugin if your application uses another authentication service, not supported by the Platform authorization methods.
To make a plugin for any authentication service compatible, use the following full flow diagram. See VPN Platform Flow.md
oAuth Server - your User authentication service.
App - your application with our SDK
1st phase (Authorization): A user authentication to the oAuth Server. The App gets an oAuth token (Steps 1-3 in the Flow diagram).
2nd phase (Login to Platform):
Step 4: The App calls a POST /user/login method (or calls a login method of our SDK) with the parameter "auth_method" = your plugin name and "access_token" = oAuth token.
Step 5: The Platform verifies this oAuth token in your oAuth Server. In this step, the "GetUserInfo (oauth_token)" method is called (its name can be changed). You should provide this method for us.
Step 6: The example of the response to this method:
{
"result": "OK",
"user":
{
"uid": 690109944
}
}or
If a user's oAuth token verification is successful, the response includes {"result": "OK"} and additional user information (e.g., UID on your side). If a user's oAuth token verification is unsuccessful, the response is {"result": "Not found"} or any similar response.
Step 7: If the verification is unsuccessful, the Platform returns an error code:
If the verification is successful, the Platform registers the user and his device in the project. The process of registration can include set specific user parameters like Traffic, License, Status, Extref, Description, User country (it depends on your application logic). See descriptions of these parameters:
User pageLast updated
Was this helpful?