org.soyatec.windowsazure.authenticate
Class SharedKeyCredentialsWrapper

java.lang.Object
  extended by org.soyatec.windowsazure.authenticate.SharedKeyCredentials
      extended by org.soyatec.windowsazure.authenticate.SharedKeyCredentialsWrapper

public class SharedKeyCredentialsWrapper
extends SharedKeyCredentials

The wrapper of the shared key credentials.


Constructor Summary
SharedKeyCredentialsWrapper(SharedKeyCredentials credentials, ISharedAccessUrl url, IBlobContainer container)
          Create a SharedKeyCredentialsWrapper object given credentials, sharedAccessUrl and a blobContainer.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getAccountName()
           
 SharedKeyCredentials getCredentials()
           
 byte[] getKey()
           
 ISharedAccessUrl getShareAccessUrl()
           
 int hashCode()
           
static java.lang.String join(java.lang.String se, java.lang.String[] sources)
          Inserted between each source with string.
 void signRequest(org.apache.http.HttpRequest request, org.soyatec.windowsazure.internal.ResourceUriComponents uriComponents)
          Signs the request appropriately to make it an authenticated request.
 void signRequestForSharedKeyLite(org.apache.http.HttpRequest request, org.soyatec.windowsazure.internal.ResourceUriComponents uriComponents)
          Signs requests using the SharedKeyLite authentication scheme with is used for the table storage service.
 java.lang.String signSharedAccessUrl(java.lang.String permissions, java.lang.String start, java.lang.String expiry, java.lang.String canonicalizedResource, java.lang.String identifier)
          Create the signature with permissions, start, expiry, canonicalizedResource and identifier.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SharedKeyCredentialsWrapper

public SharedKeyCredentialsWrapper(SharedKeyCredentials credentials,
                                   ISharedAccessUrl url,
                                   IBlobContainer container)
Create a SharedKeyCredentialsWrapper object given credentials, sharedAccessUrl and a blobContainer.

Parameters:
credentials -
url -
container -
Method Detail

signRequest

public void signRequest(org.apache.http.HttpRequest request,
                        org.soyatec.windowsazure.internal.ResourceUriComponents uriComponents)
Description copied from class: SharedKeyCredentials
Signs the request appropriately to make it an authenticated request. Note that this method takes the URI components as decoding the URI components requires the knowledge of whether the URI is in path-style or host-style and a host-suffix if it's host-style.

Overrides:
signRequest in class SharedKeyCredentials
Parameters:
request -
uriComponents -
See Also:
SharedKeyCredentials.signRequest(org.apache.http.HttpRequest, org.soyatec.windowsazure.internal.ResourceUriComponents)

join

public static final java.lang.String join(java.lang.String se,
                                          java.lang.String[] sources)
Inserted between each source with string.

Parameters:
se - The string insert between each source.
sources - The sources to join.
Returns:
The string of sources joined with string.

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object
Returns:
See Also:
Object.equals(java.lang.Object)

getAccountName

public java.lang.String getAccountName()
Overrides:
getAccountName in class SharedKeyCredentials
Returns:
See Also:
SharedKeyCredentials.getAccountName()

getKey

public byte[] getKey()
Overrides:
getKey in class SharedKeyCredentials
Returns:
See Also:
SharedKeyCredentials.getKey()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
Returns:
See Also:
Object.hashCode()

signRequestForSharedKeyLite

public void signRequestForSharedKeyLite(org.apache.http.HttpRequest request,
                                        org.soyatec.windowsazure.internal.ResourceUriComponents uriComponents)
Description copied from class: SharedKeyCredentials
Signs requests using the SharedKeyLite authentication scheme with is used for the table storage service.

Overrides:
signRequestForSharedKeyLite in class SharedKeyCredentials
Parameters:
request -
uriComponents -
See Also:
SharedKeyCredentials.signRequestForSharedKeyLite(org.apache.http.HttpRequest, org.soyatec.windowsazure.internal.ResourceUriComponents)

signSharedAccessUrl

public java.lang.String signSharedAccessUrl(java.lang.String permissions,
                                            java.lang.String start,
                                            java.lang.String expiry,
                                            java.lang.String canonicalizedResource,
                                            java.lang.String identifier)
Description copied from class: SharedKeyCredentials
Create the signature with permissions, start, expiry, canonicalizedResource and identifier.

Overrides:
signSharedAccessUrl in class SharedKeyCredentials
Parameters:
permissions -
start -
expiry -
canonicalizedResource -
identifier -
Returns:
See Also:
SharedKeyCredentials.signSharedAccessUrl(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
See Also:
Object.toString()

getShareAccessUrl

public ISharedAccessUrl getShareAccessUrl()
Returns:
the shareAccessUrl

getCredentials

public SharedKeyCredentials getCredentials()
Returns:
the credentials