Auth Plugin requirements
Description and requirements of a user authentication plugin.
Last updated
Description and requirements of a user authentication plugin.
Last updated
You need a plugin if your application uses another authentication service, not supported by the Platform authorization methods.
We can make a plugin for any authentication service compatible with the following flow:
This is a piece of the full Flow diagram:
VPN Platform FlowoAuth 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:
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 page