@Override public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response)throws IOException, ServletException { baseRequest.setHandled(true); try { Authentication authentication = digestAuthenticator.validateRequest(request, response, true); if (authentication instanceof Authentication.User) { response.setContentType("text/plain"); Authentication.User user = (Authentication.User) authentication; response.getWriter().println(user.getAuthMethod()); } else if (authentication instanceof Authentication.ResponseSent) { Authentication.ResponseSent responseSent = (Authentication.ResponseSent) authentication; } } catch (ServerAuthException e) { e.printStackTrace(); } } }
@Override public String getAuthType() { if (_authentication instanceof Authentication.Deferred) setAuthentication(((Authentication.Deferred)_authentication).authenticate(this)); if (_authentication instanceof Authentication.User) return ((Authentication.User)_authentication).getAuthMethod(); return null; }
public String getAuthType() { if (_authentication instanceof Authentication.Deferred) setAuthentication(((Authentication.Deferred)_authentication).authenticate(this)); if (_authentication instanceof Authentication.User) return ((Authentication.User)_authentication).getAuthMethod(); return null; }
@Override public String getAuthType() { if (_authentication instanceof Authentication.Deferred) setAuthentication(((Authentication.Deferred)_authentication).authenticate(this)); if (_authentication instanceof Authentication.User) return ((Authentication.User)_authentication).getAuthMethod(); return null; }
public String getAuthType() { if (_authentication instanceof Authentication.Deferred) setAuthentication(((Authentication.Deferred)_authentication).authenticate(this)); if (_authentication instanceof Authentication.User) return ((Authentication.User)_authentication).getAuthMethod(); return null; }
@Override public String getAuthType() { if (_authentication instanceof Authentication.Deferred) setAuthentication(((Authentication.Deferred)_authentication).authenticate(this)); if (_authentication instanceof Authentication.User) return ((Authentication.User)_authentication).getAuthMethod(); return null; }
public String getAuthType() { if (_authentication instanceof Authentication.Deferred) setAuthentication(((Authentication.Deferred)_authentication).authenticate(this)); if (_authentication instanceof Authentication.User) return ((Authentication.User)_authentication).getAuthMethod(); return null; }
@Override public String getAuthType() { if (_authentication instanceof Authentication.Deferred) setAuthentication(((Authentication.Deferred)_authentication).authenticate(this)); if (_authentication instanceof Authentication.User) return ((Authentication.User)_authentication).getAuthMethod(); return null; }
public String getAuthType() { if (_authentication instanceof Authentication.Deferred) setAuthentication(((Authentication.Deferred)_authentication).authenticate(this)); if (_authentication instanceof Authentication.User) return ((Authentication.User)_authentication).getAuthMethod(); return null; }
public String getAuthType() { if (_authentication instanceof Authentication.Deferred) setAuthentication(((Authentication.Deferred)_authentication).authenticate(this)); if (_authentication instanceof Authentication.User) return ((Authentication.User)_authentication).getAuthMethod(); return null; }
@Override public String getAuthType() { if (_authentication instanceof Authentication.Deferred) setAuthentication(((Authentication.Deferred)_authentication).authenticate(this)); if (_authentication instanceof Authentication.User) return ((Authentication.User)_authentication).getAuthMethod(); return null; }