How to Configure Identity Provider programmatically using Keycloak Admin Client

Hi guys,

I am implementing an Java application that configures programmatically a Keycloak Realm using Keycloak Admin Client.

Question: is it possible to configure an Identity Provider (like for instance Github) using Keycloak Admin Client classes like RealmRepresentation, IdentityProviderRepresentation, etc?

If yes, how to inform Identity Provider’s ClientId, ClientSecret, and RedirectUri?