@Singleton public class SharedKeyLiteAuthentication extends Object implements HttpRequestFilter
Constructor and Description |
---|
SharedKeyLiteAuthentication(SignatureWire signatureWire,
com.google.common.base.Supplier<Credentials> creds,
javax.inject.Provider<String> timeStampProvider,
Crypto crypto,
HttpUtils utils,
boolean sasAuthentication,
StorageUrlSupplier storageUrlSupplier) |
Modifier and Type | Method and Description |
---|---|
String |
calculateSignature(String toSign) |
String |
createStringToSign(HttpRequest request) |
String[] |
cutUri(URI uri)
this is the method to parse container name and blob name from the HttpRequest.
|
HttpRequest |
filter(HttpRequest request)
this is an updated filter method, which decides whether the SAS or SharedKeyLite
is used and applies the right filtering.
|
HttpRequest |
filterKey(HttpRequest request)
this is a 'standard' filter method, applied when SharedKeyLite authentication is used.
|
HttpRequest |
filterSAS(HttpRequest request,
String credential)
this filter method is applied only for the cases with SAS Authentication.
|
String |
signString(String toSign) |
@Inject public SharedKeyLiteAuthentication(SignatureWire signatureWire, com.google.common.base.Supplier<Credentials> creds, javax.inject.Provider<String> timeStampProvider, Crypto crypto, HttpUtils utils, @Named(value="sasAuth") boolean sasAuthentication, StorageUrlSupplier storageUrlSupplier)
public HttpRequest filter(HttpRequest request) throws HttpException
filter
in interface HttpRequestFilter
HttpException
public HttpRequest filterSAS(HttpRequest request, String credential) throws HttpException, IllegalArgumentException
public HttpRequest filterKey(HttpRequest request) throws HttpException
HttpException
public String[] cutUri(URI uri) throws IllegalArgumentException
IllegalArgumentException
public String createStringToSign(HttpRequest request)
public String calculateSignature(String toSign) throws HttpException
HttpException
Copyright © 2009–2021 The Apache Software Foundation. All rights reserved.