public final class TokenCredentials extends java.lang.Object implements ICredentials
HttpPipeline
and is the TokenCredential's policy factory.Constructor and Description |
---|
TokenCredentials(java.lang.String token)
Creates a token credential for use with role-based access control (RBAC) access to Azure Storage resources.
|
Modifier and Type | Method and Description |
---|---|
com.microsoft.rest.v2.policy.RequestPolicy |
create(com.microsoft.rest.v2.policy.RequestPolicy next,
com.microsoft.rest.v2.policy.RequestPolicyOptions options) |
java.lang.String |
getToken()
Retrieve the value of the token used by this factory.
|
void |
setToken(java.lang.String token)
Update the token to a new value.
|
public TokenCredentials(java.lang.String token)
token
- A String
of the token to use for authentication.public java.lang.String getToken()
String
with the token's value.public void setToken(java.lang.String token)
token
- A String
containing the new token's value.public com.microsoft.rest.v2.policy.RequestPolicy create(com.microsoft.rest.v2.policy.RequestPolicy next, com.microsoft.rest.v2.policy.RequestPolicyOptions options)
create
in interface com.microsoft.rest.v2.policy.RequestPolicyFactory