org.jclouds.chef.filters
Class SignedHeaderAuth

java.lang.Object
  extended by org.jclouds.chef.filters.SignedHeaderAuth
All Implemented Interfaces:
org.jclouds.http.HttpRequestFilter

@Singleton
public class SignedHeaderAuth
extends Object
implements org.jclouds.http.HttpRequestFilter

Ported from mixlib-authentication in order to sign Chef requests.

See Also:

Field Summary
static String SIGNING_DESCRIPTION
           
 
Constructor Summary
SignedHeaderAuth(org.jclouds.http.internal.SignatureWire signatureWire, com.google.common.base.Supplier<org.jclouds.domain.Credentials> creds, com.google.common.base.Supplier<PrivateKey> supplyKey, javax.inject.Provider<String> timeStampProvider, org.jclouds.http.HttpUtils utils, org.jclouds.crypto.Crypto crypto)
           
 
Method Summary
 String createStringToSign(String request, String hashedPath, String contentHash, String timestamp)
           
 org.jclouds.http.HttpRequest filter(org.jclouds.http.HttpRequest input)
           
 String sign(String toSign)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SIGNING_DESCRIPTION

public static final String SIGNING_DESCRIPTION
See Also:
Constant Field Values
Constructor Detail

SignedHeaderAuth

@Inject
public SignedHeaderAuth(org.jclouds.http.internal.SignatureWire signatureWire,
                               com.google.common.base.Supplier<org.jclouds.domain.Credentials> creds,
                               com.google.common.base.Supplier<PrivateKey> supplyKey,
                               javax.inject.Provider<String> timeStampProvider,
                               org.jclouds.http.HttpUtils utils,
                               org.jclouds.crypto.Crypto crypto)
Method Detail

filter

public org.jclouds.http.HttpRequest filter(org.jclouds.http.HttpRequest input)
                                    throws org.jclouds.http.HttpException
Specified by:
filter in interface org.jclouds.http.HttpRequestFilter
Throws:
org.jclouds.http.HttpException

createStringToSign

public String createStringToSign(String request,
                                 String hashedPath,
                                 String contentHash,
                                 String timestamp)

sign

public String sign(String toSign)


Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.