Class SharedKeyLiteAuthentication

java.lang.Object
org.jclouds.azure.storage.filters.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 Details

    • SharedKeyLiteAuthentication

      @Inject public SharedKeyLiteAuthentication(org.jclouds.http.internal.SignatureWire signatureWire, com.google.common.base.Supplier<org.jclouds.domain.Credentials> creds, jakarta.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 Details

    • 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
    • filterSharedKey

      public org.jclouds.http.HttpRequest filterSharedKey(org.jclouds.http.HttpRequest request) throws org.jclouds.http.HttpException
      this is a 'standard' filter method, applied when SharedKey authentication is used.
      Throws:
      org.jclouds.http.HttpException
    • cutUri

      public String[] cutUri(URI uri) throws IllegalArgumentException
      this is the method to parse container name and blob name from the HttpRequest.
      Throws:
      IllegalArgumentException
    • createStringToSignForSharedKey

      public String createStringToSignForSharedKey(org.jclouds.http.HttpRequest request)
    • 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
    • signString

      public String signString(String toSign)