Partilhar via


GetClientAccessTokenOptions Class

  • java.lang.Object
    • com.azure.messaging.webpubsub.models.GetClientAccessTokenOptions

public final class GetClientAccessTokenOptions

Constructor Summary

Constructor Description
GetClientAccessTokenOptions()

Creates an instance of GetClientAccessTokenOptions.

Method Summary

Modifier and Type Method and Description
GetClientAccessTokenOptions addGroup(String group)

Adds a group to the requested authentication token.

GetClientAccessTokenOptions addRole(String role)

Adds a role to the requested authentication token.

Duration getExpiresAfter()

Returns the duration after which the requested authentication token will expire.

List<String> getGroups()

Returns the complete set of groups to be included when creating the authentication token.

List<String> getRoles()

Returns the complete set of roles to be included when creating the authentication token.

String getUserId()

Returns the user ID to be used when creating the authentication token.

WebPubSubClientProtocol getWebPubSubClientProtocol()

Returns the endpoint type of the client.

GetClientAccessTokenOptions setExpiresAfter(Duration expiresAfter)

Specifies when the duration after which the requested authentication token will expire.

GetClientAccessTokenOptions setGroups(List<String> groups)

Specifies the complete set of groups to be included when creating the authentication token, overwriting any other groups previously set on this instance.

GetClientAccessTokenOptions setRoles(List<String> roles)

Specifies the complete set of roles to be included when creating the authentication token, overwriting any other roles previously set on this instance.

GetClientAccessTokenOptions setUserId(String userId)

Specifies the user ID to be used when creating the authentication token.

GetClientAccessTokenOptions setWebPubSubClientProtocol(WebPubSubClientProtocol webPubSubClientProtocol)

Specifies the endpoint type of the client.

Methods inherited from java.lang.Object

Constructor Details

GetClientAccessTokenOptions

public GetClientAccessTokenOptions()

Creates an instance of GetClientAccessTokenOptions.

Method Details

addGroup

public GetClientAccessTokenOptions addGroup(String group)

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.

addRole

public GetClientAccessTokenOptions addRole(String role)

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.

getExpiresAfter

public Duration getExpiresAfter()

Returns the duration after which the requested authentication token will expire.

Returns:

The duration after which the requested authentication token will expire.

getGroups

public List<String> 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

getRoles

public List<String> 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.

getUserId

public String 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.

getWebPubSubClientProtocol

public WebPubSubClientProtocol 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.

setExpiresAfter

public GetClientAccessTokenOptions setExpiresAfter(Duration expiresAfter)

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.

setGroups

public GetClientAccessTokenOptions setGroups(List<String> groups)

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.

setRoles

public GetClientAccessTokenOptions setRoles(List<String> roles)

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.

setUserId

public GetClientAccessTokenOptions setUserId(String userId)

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.

setWebPubSubClientProtocol

public GetClientAccessTokenOptions setWebPubSubClientProtocol(WebPubSubClientProtocol webPubSubClientProtocol)

Specifies the endpoint type of the client. Default type is default

Parameters:

webPubSubClientProtocol - The endpoint type of client

Returns:

The same instance of this type, modified based on the value provided in this set method.

Applies to