Class GetClientAccessTokenOptions

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

public final class GetClientAccessTokenOptions extends Object
  • Constructor Details

    • GetClientAccessTokenOptions

      public GetClientAccessTokenOptions()
  • Method Details

    • 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.
    • 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.
    • 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.
    • 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.
    • 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
    • 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.
    • 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.