3

I am having REST API with JPA and for login framework I am using Apache Shiro. Is it possible to integrate Apache Shiro with AngularJS and If YES Please give some example to workout with it.

Thanks

Amit Mourya
  • 538
  • 1
  • 7
  • 18

3 Answers3

0

I know this is old, but if someone is looking for a solution still (as of Oct 2016) there is this. Requires some effort to integrate.

ben_979
  • 163
  • 3
  • 18
-1

Thats a valid ques... in fact I am scoping this out now prototyping. I wont get to it soon though I am tied up

  1. create your login.html which is the view and to a home page
  2. create your controller (angular style)
  3. create your model (angular style)
  4. write your java model
  5. include shiro libs inside your maven project xml file
  6. implement a shiro realm configuring such
  7. implement a java security service which should be triggered by shiro onlogin
  8. operate your doMethods for shiro within the service
  9. allow room for java permission and role logic
  10. build deploy... DONE

wish I could give you more just haven't had a chance to grudge thru it. I will eventually though.

I am sure someone else will clean this up but shiro and angular I say are ok...

in fact all JAVA and Angular are perfect... nobody realizes http has been abused and misused for twenty years... (ok 15)... and REST puts the old days away for good.

here is your new architecture

Bootstrap,Angular,MVC JavaScript,REST,Hibernate JPA

Ken
  • 35
  • 5
-2

BackBone is another alternative to Angular but its listener implementation is mandatory. Angular does more for you without need for listeners and is how HTMl would have been implemented if it were app centric when it was invented.

All these do is implement MVC and bury your ajax so your got a clean lookin html.

Ken
  • 35
  • 5