authenticate(UserRealm realm, String pathInContext, Request request, Response response) Authenticate.
Parameters: realm - an UserRealm value Parameters: pathInContext - a String value Parameters: request - a Request value Parameters: response - a Response value.
Authenticate.
Parameters: realm - an UserRealm value Parameters: pathInContext - a String value Parameters: request - a Request value Parameters: response - a Response value. If non-null response is passed, then a failed authentication will result in a challenge response being set in the response. User Principal if authenticated. Null if Authenticationfailed. If the SecurityConstraint.__NOBODY instance is returned,the request is considered as part of the authentication process. exception: IOException - if an error occurs