public final class StorageCredentialsToken extends StorageCredentials
| Constructor and Description |
|---|
StorageCredentialsToken(String accountName,
String token)
Creates an instance of the
StorageCredentialsToken class, using the specified token. |
| Modifier and Type | Method and Description |
|---|---|
String |
getAccountName()
Gets the account name.
|
String |
getToken()
Gets the token.
|
boolean |
isHttpsOnly()
Gets whether this
StorageCredentials object only allows access via HTTPS. |
String |
toString(boolean exportSecrets)
Returns a
String that represents this instance, optionally including sensitive data. |
StorageUri |
transformUri(StorageUri resourceUri,
OperationContext opContext)
Transforms a resource URI into a shared access signature URI, by appending a shared access token and using the
specified operation context.
|
URI |
transformUri(URI resourceUri,
OperationContext opContext)
Transforms a resource URI into a shared access signature URI, by appending a shared access token and using the
specified operation context.
|
void |
updateToken(String token)
Sets the token to be used when authenticating HTTPS requests.
|
transformUri, transformUri, tryParseCredentialspublic StorageCredentialsToken(String accountName, String token)
StorageCredentialsToken class, using the specified token.
Token credentials must only be used with HTTPS requests on the blob and queue services.
The specified token is stored as a String.token - A String that represents the token.public boolean isHttpsOnly()
StorageCredentials object only allows access via HTTPS.isHttpsOnly in class StorageCredentialsboolean representing whether this StorageCredentials
object only allows access via HTTPS.public String getToken()
String that contains the token.public void updateToken(String token)
token - A String that represents the access token to be used when authenticating HTTPS requests.public String getAccountName()
getAccountName in class StorageCredentialsString that contains the account name.public String toString(boolean exportSecrets)
String that represents this instance, optionally including sensitive data.toString in class StorageCredentialsexportSecrets - true to include sensitive data in the return string; otherwise, false.String that represents this object, optionally including sensitive data.public URI transformUri(URI resourceUri, OperationContext opContext)
StorageCredentialstransformUri in class StorageCredentialsresourceUri - A java.net.URI object that represents the resource URI to be transformed.opContext - An OperationContext object that represents the context for the current operation. This object
is used to track requests to the storage service, and to provide additional runtime information about
the operation.java.net.URI object that represents the signature, including the resource URI and the
shared access token.public StorageUri transformUri(StorageUri resourceUri, OperationContext opContext)
StorageCredentialstransformUri in class StorageCredentialsresourceUri - A StorageUri object that represents the resource URI to be transformed.opContext - An OperationContext object that represents the context for the current operation. This object
is used to track requests to the storage service, and to provide additional runtime information about
the operation.StorageUri object that represents the signature, including the resource URI and the
shared access token.Copyright © 2018. All Rights Reserved.