Class SharedKeyLiteAuthentication

  • All Implemented Interfaces:
    org.jclouds.http.HttpRequestFilter

    @Singleton
    public class SharedKeyLiteAuthentication
    extends Object
    implements org.jclouds.http.HttpRequestFilter
    Signs the Azure Storage request.
    See Also:
    • Constructor Detail

      • SharedKeyLiteAuthentication

        @Inject
        public SharedKeyLiteAuthentication​(org.jclouds.http.internal.SignatureWire signatureWire,
                                           com.google.common.base.Supplier<org.jclouds.domain.Credentials> creds,
                                           javax.inject.Provider<String> timeStampProvider,
                                           org.jclouds.crypto.Crypto crypto,
                                           org.jclouds.http.HttpUtils utils,
                                           @Named("sasAuth")
                                           boolean sasAuthentication,
                                           StorageUrlSupplier storageUrlSupplier,
                                           AuthType authType,
                                           OAuthFilter oAuthFilter)
    • Method Detail

      • filter

        public org.jclouds.http.HttpRequest filter​(org.jclouds.http.HttpRequest request)
                                            throws org.jclouds.http.HttpException
        this is an updated filter method, which decides whether the SAS or SharedKeyLite is used and applies the right filtering.
        Specified by:
        filter in interface org.jclouds.http.HttpRequestFilter
        Throws:
        org.jclouds.http.HttpException
      • filterSAS

        public org.jclouds.http.HttpRequest filterSAS​(org.jclouds.http.HttpRequest request,
                                                      String credential)
                                               throws org.jclouds.http.HttpException,
                                                      IllegalArgumentException
        this filter method is applied only for the cases with SAS Authentication.
        Throws:
        org.jclouds.http.HttpException
        IllegalArgumentException
      • filterKey

        public org.jclouds.http.HttpRequest filterKey​(org.jclouds.http.HttpRequest request)
                                               throws org.jclouds.http.HttpException
        this is a 'standard' filter method, applied when SharedKeyLite authentication is used.
        Throws:
        org.jclouds.http.HttpException
      • createStringToSign

        public String createStringToSign​(org.jclouds.http.HttpRequest request)
      • calculateSignature

        public String calculateSignature​(String toSign)
                                  throws org.jclouds.http.HttpException
        Throws:
        org.jclouds.http.HttpException