简体   繁体   中英

Keycloak to secure AngularJS frontend + Java web service

I want to secure an application which consists of the following;

  • angularjs frontend which sends requests to a
  • java resteasy backend web service which runs on wildfly

Both apps are running on distinct machines.

  • there is a third machine which has Keycloak on top of Wildfly.

I would like to do something like: 1. the user tries to access the frontend app and is redirected to the keycloak login page 2. after successful login, the token is returned to the angular fronted 3. the server will have access type as Bearer only and any request made from the frontend will have the token from step 2 provided

I want to know if this thing makes sense because i couldn`t find any tutorial that explains such an architecture and if so, what should i keep in mind?

Thank you.

You architecture makes sense and is a typical setup. You'll find AngularJS examples in the Keycloak distribution or in the project's github repo .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM