Steve Hu
Steve Hu

Reputation: 388

How to integrate light-oauth2 services with existing user database?

https://doc.networknt.com/tutorial/oauth/user/ says that the oauth2 server can be integrated with an existing user database but gives no examples to accomplish that. Please provide an example of how to set up the oauth2 services in a docker stack connecting to an existing SQL Server database. If such integration requires a separate REST API service that handles the implementation-specific interface, please provide an example of how that is to be deployed and configured. Thank you for your great work.

I should also note that in my implementation, I'm using reversible encryption for the username (which is an email address), firstname, lastname and mobile numbers, and a triple hash for the password. https://www.screencast.com/t/AtCS6Kcb

Upvotes: 0

Views: 529

Answers (1)

Steve Hu
Steve Hu

Reputation: 388

Integrate at the database level by using your own database instead of the default databases (MySQL, Postgres, SQL Server, Oracle, and MariaDB) supported by the light-oauth2. You need to add the extra database JDBC driver if your database is not one of the above.

The second level of integration is the custom authentication and authorization module. There are some examples in the authhub module already, and more can be added.

The last level of integration is to write your own user module to replace the existing one. You need to make sure to follow the API specification so that it can work with other microservices in light-oauth2, and the client interaction remains the same.

For option one, you just need to create database objects in your database and point the light-oauth2 services to it. For the second option, we have several examples already for GitHub, LDAP, SPENGO, etc. If you are consider the third option, then you can refer to the user module implementation as an example. We have developers who are very familiar with the module can work on the implementation if you want to pay.

Upvotes: 0

Related Questions