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
ConstructorsConstructorDescriptionCreates an instance of GetClientAccessTokenOptions. -
Method Summary
Modifier and TypeMethodDescriptionAdds a group to the requested authentication token.Adds a role to the requested authentication token.Returns the duration after which the requested authentication token will expire.Returns the complete set of groups to be included when creating the authentication token.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.Returns the endpoint type of the client.setExpiresAfter(Duration expiresAfter) Specifies when the duration after which the requested authentication token will expire.Specifies the complete set of groups to be included when creating the authentication token, overwriting any other groups previously set on this instance.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.setWebPubSubClientProtocol(WebPubSubClientProtocol webPubSubClientProtocol) Specifies the endpoint type of the client.
-
Constructor Details
-
GetClientAccessTokenOptions
public GetClientAccessTokenOptions()Creates an instance of 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.
-
getGroups
Returns the complete set of groups to be included when creating the authentication token.- Returns:
- The complete set of groups to be included when creating the authentication token
-
setGroups
Specifies the complete set of groups to be included when creating the authentication token, overwriting any other groups previously set on this instance.- Parameters:
groups- The complete set of groups 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.
-
getWebPubSubClientProtocol
Returns the endpoint type of the client.- Returns:
- The same instance of this type, modified based on the value provided in this set method.
-
setWebPubSubClientProtocol
public GetClientAccessTokenOptions setWebPubSubClientProtocol(WebPubSubClientProtocol webPubSubClientProtocol) Specifies the endpoint type of the client. Default type isdefault- Parameters:
webPubSubClientProtocol- The endpoint type of client- Returns:
- The same instance of this type, modified based on the value provided in this set method.
-
addGroup
Adds a group to the requested authentication token.- Parameters:
group- The group 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.
-