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.
-
-
Constructor Summary
Constructors Constructor Description 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, boolean sasAuthentication, StorageUrlSupplier storageUrlSupplier, AuthType authType, OAuthFilter oAuthFilter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcalculateSignature(String toSign)StringcreateStringToSign(org.jclouds.http.HttpRequest request)String[]cutUri(URI uri)this is the method to parse container name and blob name from the HttpRequest.org.jclouds.http.HttpRequestfilter(org.jclouds.http.HttpRequest request)this is an updated filter method, which decides whether the SAS or SharedKeyLite is used and applies the right filtering.org.jclouds.http.HttpRequestfilterKey(org.jclouds.http.HttpRequest request)this is a 'standard' filter method, applied when SharedKeyLite authentication is used.org.jclouds.http.HttpRequestfilterSAS(org.jclouds.http.HttpRequest request, String credential)this filter method is applied only for the cases with SAS Authentication.StringsignString(String toSign)
-
-
-
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.HttpExceptionthis is an updated filter method, which decides whether the SAS or SharedKeyLite is used and applies the right filtering.- Specified by:
filterin interfaceorg.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, IllegalArgumentExceptionthis filter method is applied only for the cases with SAS Authentication.- Throws:
org.jclouds.http.HttpExceptionIllegalArgumentException
-
filterKey
public org.jclouds.http.HttpRequest filterKey(org.jclouds.http.HttpRequest request) throws org.jclouds.http.HttpExceptionthis is a 'standard' filter method, applied when SharedKeyLite 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
-
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
-
-