Package org.jclouds.chef.filters
Class SignedHeaderAuth
- java.lang.Object
-
- org.jclouds.chef.filters.SignedHeaderAuth
-
- All Implemented Interfaces:
HttpRequestFilter
@Singleton public class SignedHeaderAuth extends Object implements HttpRequestFilter
Ported from mixlib-authentication in order to sign Chef requests.
-
-
Field Summary
Fields Modifier and Type Field Description static String
SIGNING_DESCRIPTION
-
Constructor Summary
Constructors Constructor Description SignedHeaderAuth(SignatureWire signatureWire, com.google.common.base.Supplier<Credentials> creds, com.google.common.base.Supplier<PrivateKey> supplyKey, javax.inject.Provider<String> timeStampProvider, HttpUtils utils, Crypto crypto)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
createStringToSign(String request, String hashedPath, String contentHash, String timestamp)
HttpRequest
filter(HttpRequest input)
String
sign(String toSign)
-
-
-
Field Detail
-
SIGNING_DESCRIPTION
public static final String SIGNING_DESCRIPTION
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SignedHeaderAuth
@Inject public SignedHeaderAuth(SignatureWire signatureWire, com.google.common.base.Supplier<Credentials> creds, com.google.common.base.Supplier<PrivateKey> supplyKey, javax.inject.Provider<String> timeStampProvider, HttpUtils utils, Crypto crypto)
-
-
Method Detail
-
filter
public HttpRequest filter(HttpRequest input) throws HttpException
- Specified by:
filter
in interfaceHttpRequestFilter
- Throws:
HttpException
-
createStringToSign
public String createStringToSign(String request, String hashedPath, String contentHash, String timestamp)
-
-