eDRV is a server-to-server API and does not authenticate application-side users. In order to interact with any EV charging related resources (e.g. starting a charging session) on behalf of a user, your application must bind your application's UserId with an eDRV side UserId.
eDRV leaves authentication logic to the Developer and has no biases or opinions around Auth. Some popular auth methods/services are:
- Custom / Hybrid
The only requirement from eDRV is to have Two-way bindings between user resources from the Developer application and users on the eDRV platform. There needs to be an association of ids as eDRV APIs require userId for many endpoints like (sessions, payments, user rates, location access control, etc)
eDRV user._id = 5fca57b3fbfcc // this is a user resource on eDRV which is created by the developer via using POST v1.1/users
Application user ID = 44e93f070b // this id is related to the developer's own application unique key to identify the user record in the developer's Application
Thus the link can be done as shown below:
Application.user.edrv_userId = 5fca57b3fbfcc
eDRV.user.meta_data.app_UserId = 44e93f070b
No Auth Logic From eDRV
eDRV does not handle any auth logic as this will be completely handled by the Developer with the only requirement that there should be a two-way binding between userId from eDRV and the Developer Platform.
Whenever there is a new user registration request, the Developer can take the following steps:
- Call the
POST v1.1/usersendpoint on eDRV to request a new user resource.
- Create a user record in the Developer application; then save the
user._idfrom the above step on this newly created user.
PATCH v1.1/user/:idto save resource ID as meta_data in point 2 on eDRV.
We recommend that as soon as your application is live, users from the existing driver app are prompted to register and download the new app.
It is important to capture the existing user's (eDRV) userId for establishing a two-way-binding on UserIds.
eDRV can provide necessary changes to the legacy driver app to display links, images, forms, QR codes etc. to embed and exchange the driver's userId with the new application.
Updated about 1 year ago