PrepAway - Latest Free Exam Questions & Answers

Which of the following methods determines the principle name of the current user and returns the jav a.securit

Which of the following methods determines the principle name of the current user and returns the
jav a.security.Principal object in the HttpServletRequest interface?

PrepAway - Latest Free Exam Questions & Answers

A.
getUserPrincipal()

B.
isUserInRole()

C.
getRemoteUser()

D.
getCallerPrincipal()

Explanation:
The getUserPrincipal() method determines the principle name of the current user
and returns the java.security.Principal object. The java.security.Principal object contains the
remote user name. The value of the getUserPrincipal() method returns null if no user is
used for the client authentication. The value of the getRemoteUser() method returns null if no user
remote user is granted a specified user role. The value of the isUserInRole() method returns true if
incorrect. The getCallerPrincipal() method is used to identify a caller using a java.security.Principal

object. It is not used in the HttpServletRequest interface.


Leave a Reply