Package com.amazonaws.auth

Examples of com.amazonaws.auth.Signer


     */
    protected Signer createSigner(final Request<?> request,
                                  final String bucketName,
                                  final String key) {

        Signer signer = getSigner();

        if (upgradeToSigV4() && !(signer instanceof AWSS3V4Signer)){

            AWSS3V4Signer v4Signer = new AWSS3V4Signer();

View Full Code Here


            request.addHeader(Headers.CONTENT_TYPE, generatePresignedUrlRequest.getContentType());
        }

        addResponseHeaderParameters(request, generatePresignedUrlRequest.getResponseHeaders());

        Signer signer = getSigner();
        if (signer instanceof Presigner) {
            // If we have a signer which knows how to presign requests,
            // delegate directly to it.
            ((Presigner) signer).presignRequest(
                request,
View Full Code Here

                v4Signer.setRegionName(regionName);
            }
            return v4Signer;
        }

        Signer signer = getSigner();

        if (signer instanceof S3Signer) {

            // The old S3Signer needs a method and path passed to its
            // constructor; if that's what we should use, getSigner()
View Full Code Here

        Map<String, String> originalParameters = new LinkedHashMap<String, String>();
        originalParameters.putAll(request.getParameters());
        Map<String, String> originalHeaders = new HashMap<String, String>();
        originalHeaders.putAll(request.getHeaders());
        final AWSCredentials credentials = executionContext.getCredentials();
        Signer signer = null;

        while (true) {
            ++requestCount;
            awsRequestMetrics.setCounter(Field.RequestCount, requestCount);
            if (requestCount > 1) { // retry
                request.setParameters(originalParameters);
                request.setHeaders(originalHeaders);
            }
            HttpRequestBase httpRequest = null;
            org.apache.http.HttpResponse apacheResponse = null;

            try {
                // Sign the request if a signer was provided
                if (signer == null)
                    signer = executionContext.getSignerByURI(request.getEndpoint());
                if (signer != null && credentials != null) {
                    awsRequestMetrics.startEvent(Field.RequestSigningTime);
                    try {
                        signer.sign(request, credentials);
                    } finally {
                        awsRequestMetrics.endEvent(Field.RequestSigningTime);
                    }
                }
View Full Code Here

        Map<String, String> originalParameters = new HashMap<String, String>();
        originalParameters.putAll(request.getParameters());
        Map<String, String> originalHeaders = new HashMap<String, String>();
        originalHeaders.putAll(request.getHeaders());
        final AWSCredentials credentials = executionContext.getCredentials();
        Signer signer = null;

        while (true) {
            ++requestCount;
            awsRequestMetrics.setCounter(Field.RequestCount, requestCount);
            if (requestCount > 1) { // retry
                request.setParameters(originalParameters);
                request.setHeaders(originalHeaders);
            }
            HttpRequestBase httpRequest = null;
            org.apache.http.HttpResponse apacheResponse = null;

            try {
                // Sign the request if a signer was provided
                if (signer == null)
                    signer = executionContext.getSignerByURI(request.getEndpoint());
                if (signer != null && credentials != null) {
                    awsRequestMetrics.startEvent(Field.RequestSigningTime);
                    try {
                        signer.sign(request, credentials);
                    } finally {
                        awsRequestMetrics.endEvent(Field.RequestSigningTime);
                    }
                }
View Full Code Here

            request.addHeader(Headers.CONTENT_TYPE, generatePresignedUrlRequest.getContentType());
        }

        addResponseHeaderParameters(request, generatePresignedUrlRequest.getResponseHeaders());

        Signer signer = getSigner();
        if (signer instanceof Presigner) {
            // If we have a signer which knows how to presign requests,
            // delegate directly to it.
            ((Presigner) signer).presignRequest(
                request,
View Full Code Here

                v4Signer.setRegionName(regionName);
            }
            return v4Signer;
        }

        Signer signer = getSigner();

        if (signer instanceof S3Signer) {

            // The old S3Signer needs a method and path passed to its
            // constructor; if that's what we should use, getSigner()
View Full Code Here

TOP

Related Classes of com.amazonaws.auth.Signer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.