getRemoteUser and getAuthType methods


 

+

Search Tips   |   Advanced Search

 

The getRemoteUser and getAuthType are part of the interface...

javax.servlet.http.HttpServletRequest

If the user has been authenticated, the getRemoteUser method returns the login of the user that makes the request.

If the user is not authenticated, the getRemoteUser method returns null. The getAuthType method returns the name of the authentication scheme used to protect the servlet (for example, BASIC or SSL). If the servlet is not protected, the getAuthType method returns null.

For both methods, the data that is returned depends upon whether security is enabled in the appserver where the servlet is deployed.

The following possibilities exist:

We can disable security at the appserver level by overriding the administrative security setting.



 

Related tasks

Develop with programmatic security APIs for Web apps

 

Related

Example: Using a programmatic security model for a Web app