Class S3SignerV2


  • public final class S3SignerV2
    extends S3Signer
    • Constructor Summary

      Constructors 
      Constructor Description
      S3SignerV2​(S3Config s3Config)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.net.URL generatePresignedUrl​(PresignedUrlRequest request)
      Generate presigned URL and then return the URL
      protected java.util.SortedMap<java.lang.String,​java.lang.String> getCanonicalizedHeaders​(java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> headers, java.util.Map<java.lang.String,​java.lang.String> parameters)  
      protected java.lang.String getDate​(java.util.Map<java.lang.String,​java.lang.String> parameters, java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> headers)
      Get the date as String
      protected java.lang.String getSignature​(java.lang.String stringToSign, byte[] signingKey)
      Get the signature as String, singingKey is only needed for v4 signer
      void sign​(com.sun.jersey.api.client.ClientRequest request, java.lang.String resource, java.util.Map<java.lang.String,​java.lang.String> parameters, java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> headers)
      Sign the request
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • S3SignerV2

        public S3SignerV2​(S3Config s3Config)
    • Method Detail

      • sign

        public void sign​(com.sun.jersey.api.client.ClientRequest request,
                         java.lang.String resource,
                         java.util.Map<java.lang.String,​java.lang.String> parameters,
                         java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> headers)
        Description copied from class: S3Signer
        Sign the request
        Specified by:
        sign in class S3Signer
      • getSignature

        protected java.lang.String getSignature​(java.lang.String stringToSign,
                                                byte[] signingKey)
        Description copied from class: S3Signer
        Get the signature as String, singingKey is only needed for v4 signer
        Specified by:
        getSignature in class S3Signer
      • getDate

        protected java.lang.String getDate​(java.util.Map<java.lang.String,​java.lang.String> parameters,
                                           java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> headers)
        Description copied from class: S3Signer
        Get the date as String
        Specified by:
        getDate in class S3Signer
      • getCanonicalizedHeaders

        protected java.util.SortedMap<java.lang.String,​java.lang.String> getCanonicalizedHeaders​(java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> headers,
                                                                                                       java.util.Map<java.lang.String,​java.lang.String> parameters)
        Specified by:
        getCanonicalizedHeaders in class S3Signer