Java Web Security Quiz:
Which of the following methods can be used to determine whether an authenticated user is included in a specified logical role? A. HttpServletRequest.isUserInRole (String rolename) B. HttpServletRequest.isInRole (String user, String rolename) C. HttpServletRequest.checkUserInRole (String rolename); D. None of the methods are correct
[Ans: A]
The isUserInRole (String rolename) method call returns a boolean indicating whether an authenticated user is included as part of the specific logical role.
If the user is NOT authenticated, this method returns false.
HRCI Certifications : PHR, SPHR, GPHR | PMI Certifications: PMP Java Certifications : SCWCD, SCBCD, SCJDWS, SCJP | Security Certifications: CISSP, CISA