Bypass keycloak login system with rest api using java and generate realm/application URL

756 views Asked by At

I am trying to integrate apiman in my project. I am able to do following things with simple java program ( REST api ),

  1. Create user for keycloak realm
  2. Assign role for user.
  3. Able to login in apiman with those credentials.

Things I am not being able to do ,

  1. Authenticate user with rest api like keycloak does it from UI ( like the following image )
  2. Generate session details and then generate URL for that realm and redirect to that project.
  3. Not able able to directly login into the apiman system.

Basically I want to bypass keycloak login system with REST API using java.

enter image description here

I want to directly go into this screen. I am not able to find any way by which I can generate or authenticate user in keycloak and generate url for the below screen ( apiman ) and then redirect the user on the below screen using that URL. enter image description here

1

There are 1 answers

1
Bench Vue On

I am first experience the ApiMan. But it works this URL.

http://localhost:8080/apimanui/api-manager/

It turns to ApiMan Login screen. enter image description here

Then I enter new user id and password enter image description here

It goes to this screen. enter image description here

I follow ApiMan's steps. http://www.apiman.io/latest/download.html

mkdir ~/apiman-2.0.0.Final
cd ~/apiman-2.0.0.Final
curl -L https://download.jboss.org/wildfly/20.0.1.Final/wildfly-20.0.1.Final.zip -o wildfly-20.0.1.Final.zip
curl -L https://github.com/apiman/apiman/releases/download/2.0.0.Final/apiman-distro-wildfly-2.0.0.Final-overlay.zip -o apiman-distro-wildfly-2.0.0.Final-overlay.zip
unzip wildfly-20.0.1.Final.zip
unzip -o apiman-distro-wildfly-2.0.0.Final-overlay.zip -d wildfly-20.0.1.Final
cd wildfly-20.0.1.Final
./bin/standalone.sh -c standalone-apiman.xml