How to integrate Apache Shiro with AngularJS

I have a REST API with JPA and for the login platform I am using Apache Shiro. Is it possible to integrate Apache Shiro with AngularJS and If YES Please provide a workout example.

thank

+3


source to share


3 answers


I know this is old, but if anyone is looking for a solution still (as of October 2016) this . It takes some effort to integrate.



0


source


These are valid questions ... actually I am currently reviewing this prototyping. I won't get to it soon though I'm tied

  • create your login.html which is the view and main page
  • create your controller (angular style)
  • create model (angular style)
  • write your Java model
  • include shiro libs inside your maven project xml file
  • implement shiro realm configuration like
  • implement a Java security service to be started with siro onlogin
  • manage your doMethods for shiro in the service
  • allow access to Java permission and role logic
  • deploy ... DONE

It's a pity that I couldn't give you more, just didn't have the opportunity to offend him. I do end up though.

I'm sure someone else will clean up this, but siro and angular I say it's ok ...



in fact all JAVA and angular are perfect ... nobody realizes that http has been abused and abused for twenty years ... (normally 15) ... and REST puts the old days forever.

here is your new architecture

Bootstrap, Angular, MVC JavaScript, REST, Hibernate JPA

-1


source


BackBone is another Angular alternative, but its listener implementation is required. Angular does more for you without the need for listeners and how HTMl would be implemented if it was application-centric when it was invented.

All of this is to implement MVC and bury your ajax so you get clean lookin html.

-2


source







All Articles