StorageCredentialsToken Class
- java.
lang. Object - StorageCredentials
- com.
microsoft. azure. storage. StorageCredentialsToken
- com.
public class StorageCredentialsToken extends StorageCredentials
Represents storage account credentials, based on an authentication token, for accessing the Microsoft Azure storage services.
Constructor Summary
Constructor | Description |
---|---|
StorageCredentialsToken(String accountName, String token) |
Creates an instance of the 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 . |
Method Summary
Modifier and Type | Method and Description |
---|---|
String |
getAccountName()
Gets the account name. |
String |
getToken()
Gets the token. |
boolean |
isHttpsOnly()
Gets whether this object only allows access via HTTPS. |
String |
toString(final boolean exportSecrets)
Returns a that represents this instance, optionally including sensitive data. |
Storage |
transformUri(StorageUri resourceUri, OperationContext opContext) |
URI | transformUri(URI resourceUri, OperationContext opContext) |
synchronized void |
updateToken(final String token)
Sets the token to be used when authenticating HTTPS requests. |
Inherited Members
Constructor Details
StorageCredentialsToken
public StorageCredentialsToken(String accountName, String token)
Creates an instance of the 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 .
Parameters:
String
that represents the token.
Method Details
getAccountName
public String getAccountName()
Gets the account name.
Returns:
String
that contains the account name.getToken
public String getToken()
Gets the token.
Returns:
String
that contains the token.isHttpsOnly
public boolean isHttpsOnly()
Gets whether this object only allows access via HTTPS.
Returns:
boolean
representing whether this StorageCredentials
object only allows access via HTTPS.toString
public String toString(final boolean exportSecrets)
Returns a that represents this instance, optionally including sensitive data.
Parameters:
true
to include sensitive data in the return string; otherwise, false
.
Returns:
String
that represents this object, optionally including sensitive data.transformUri
public StorageUri transformUri(StorageUri resourceUri, OperationContext opContext)
Parameters:
transformUri
public URI transformUri(URI resourceUri, OperationContext opContext)
Parameters:
updateToken
public synchronized void updateToken(final String token)
Sets the token to be used when authenticating HTTPS requests.
Parameters:
String
that represents the access token to be used when authenticating HTTPS requests.