// 5) Add authorization headers at the end
// ---------------------------------------
// Add the security headers. NOTE: This must stay at the end because
// the AWS challenge scheme requires access to all HTTP headers
ChallengeResponse challengeResponse = request.getChallengeResponse();
if (challengeResponse != null) {
addHeader(
HeaderConstants.HEADER_AUTHORIZATION,
org.restlet.engine.security.AuthenticatorUtils
.formatResponse(challengeResponse, request, headers),
headers);
}
ChallengeResponse proxyChallengeResponse = request
.getProxyChallengeResponse();
if (proxyChallengeResponse != null) {
addHeader(HeaderConstants.HEADER_PROXY_AUTHORIZATION,
org.restlet.engine.security.AuthenticatorUtils
.formatResponse(proxyChallengeResponse, request,