Class GetClientAccessTokenOptions
java.lang.Object
com.azure.messaging.webpubsub.models.GetClientAccessTokenOptions
Options class for configuring the
WebPubSubServiceAsyncClient.getClientAccessToken(GetClientAccessTokenOptions)
and
WebPubSubServiceClient.getClientAccessToken(GetClientAccessTokenOptions)
methods.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdds a role to the requested authentication token.Returns the duration after which the requested authentication token will expire.getRoles()
Returns the complete set of roles to be included when creating the authentication token.Returns the user ID to be used when creating the authentication token.setExpiresAfter
(Duration expiresAfter) Specifies when the duration after which the requested authentication token will expire.Specifies the complete set of roles to be included when creating the authentication token, overwriting any other roles previously set on this instance.Specifies the user ID to be used when creating the authentication token.
-
Constructor Details
-
GetClientAccessTokenOptions
public GetClientAccessTokenOptions()
-
-
Method Details
-
setExpiresAfter
Specifies when the duration after which the requested authentication token will expire.- Parameters:
expiresAfter
- The duration after which the requested authentication token will expire.- Returns:
- The same instance of this type, modified based on the value provided in this set method.
-
getExpiresAfter
Returns the duration after which the requested authentication token will expire.- Returns:
- The duration after which the requested authentication token will expire.
-
addRole
Adds a role to the requested authentication token.- Parameters:
role
- The role to be added to the requested authentication token.- Returns:
- The same instance of this type, modified based on the value provided in this add method.
-
setRoles
Specifies the complete set of roles to be included when creating the authentication token, overwriting any other roles previously set on this instance.- Parameters:
roles
- The complete set of roles to be included when creating the authentication token.- Returns:
- The same instance of this type, modified based on the value provided in this set method.
-
getRoles
Returns the complete set of roles to be included when creating the authentication token.- Returns:
- The complete set of roles to be included when creating the authentication token
-
setUserId
Specifies the user ID to be used when creating the authentication token.- Parameters:
userId
- The user ID to be used when creating the authentication token.- Returns:
- The same instance of this type, modified based on the value provided in this set method.
-
getUserId
Returns the user ID to be used when creating the authentication token.- Returns:
- The user ID to be used when creating the authentication token.
-