Authentication through Google API

Hello,

I’d like to implement custom authentication for my Camunda application, through Google’s API.
Authentication itself should be going through Google’s API, but all other information about the user and their roles/permissions would be kept in Camunda’s database.

So the login process would look like this:

  1. if new user tries to log in, after they authenticate their gmail account, user information would be created for them in Camunda’s database, default roles and matching username/email
  2. if an existing user tries to log in, authentication would still go through Google, and if successful, they would be logged in as the matching user from Camunda’s database.

As far as I’m aware, it is impossible to do authentication for Google’s API through credentials purely programmatically, but has to be done through Google’s Login form, using a callback link. Is there a way to accomplish this without altering Camunda’s source code?

I currently have one Spring application and a custom identity provider plugin deployed (which is mostly identical to default identity provider, with some minor adjustments).