Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Security

 
Saurabh Naik
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
I read the chapter security from HF book. but I am cofunsed..
If in my application there are 50 users and 3 roles i.e admin, user , guest . how can I assign these roles to my users ?
also confused in getUserInRole() and getUserPrinicpal() methods. what is the exact use of these methods ?

Thank you
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See http://www.coderanch.com/t/444353/Web-Component-Certification-SCWCD/certification/User-Role-config-server

Those methods tell you the identty of the user who sent the request the servlet is currently working on (her user name), and which roles she has. This information can be used to personalize the response, and to check whether this user should be allowed access to the various parts/pages of the web app.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic