@Override protected void addHttpAuthHeader(HttpRequest httpRequest, HttpContext httpContext) throws Exception { try { // Generate the service ticket for sending to the server. // Locking ensures the tokens are unique in case of concurrent requests kerberosLock.lock(); String kerberosAuthHeader = HttpAuthUtils.getKerberosServiceTicket(principal, host, serverHttpUrl, loggedInSubject); // Set the session key token (Base64 encoded) in the headers httpRequest.addHeader(HttpAuthUtils.AUTHORIZATION + ": " + HttpAuthUtils.NEGOTIATE + " ", kerberosAuthHeader); } catch (Exception e) { throw new HttpException(e.getMessage(), e); } finally { kerberosLock.unlock(); } } }
@Override protected void addHttpAuthHeader(HttpRequest httpRequest, HttpContext httpContext) throws Exception { try { // Generate the service ticket for sending to the server. // Locking ensures the tokens are unique in case of concurrent requests kerberosLock.lock(); String kerberosAuthHeader = HttpAuthUtils.getKerberosServiceTicket(principal, host, serverHttpUrl, loggedInSubject); // Set the session key token (Base64 encoded) in the headers httpRequest.addHeader(HttpAuthUtils.AUTHORIZATION + ": " + HttpAuthUtils.NEGOTIATE + " ", kerberosAuthHeader); } catch (Exception e) { throw new HttpException(e.getMessage(), e); } finally { kerberosLock.unlock(); } } }
@Override protected void addHttpAuthHeader(HttpRequest httpRequest, HttpContext httpContext) throws Exception { try { // Generate the service ticket for sending to the server. // Locking ensures the tokens are unique in case of concurrent requests kerberosLock.lock(); String kerberosAuthHeader = HttpAuthUtils.getKerberosServiceTicket( principal, host, serverHttpUrl, assumeSubject); // Set the session key token (Base64 encoded) in the headers httpRequest.addHeader(HttpAuthUtils.AUTHORIZATION + ": " + HttpAuthUtils.NEGOTIATE + " ", kerberosAuthHeader); } catch (Exception e) { throw new HttpException(e.getMessage(), e); } finally { kerberosLock.unlock(); } } }
@Override protected void addHttpAuthHeader(HttpRequest httpRequest, HttpContext httpContext) throws Exception { try { // Generate the service ticket for sending to the server. // Locking ensures the tokens are unique in case of concurrent requests kerberosLock.lock(); String kerberosAuthHeader = HttpAuthUtils.getKerberosServiceTicket( principal, host, serverHttpUrl, assumeSubject); // Set the session key token (Base64 encoded) in the headers httpRequest.addHeader(HttpAuthUtils.AUTHORIZATION + ": " + HttpAuthUtils.NEGOTIATE + " ", kerberosAuthHeader); } catch (Exception e) { throw new HttpException(e.getMessage(), e); } finally { kerberosLock.unlock(); } } }