public final class GetAuthenticationTokenOptions extends Object
WebPubSubServiceAsyncClient.getAuthenticationToken(GetAuthenticationTokenOptions)
and
WebPubSubServiceClient.getAuthenticationToken(GetAuthenticationTokenOptions)
methods.Constructor and Description |
---|
GetAuthenticationTokenOptions() |
Modifier and Type | Method and Description |
---|---|
GetAuthenticationTokenOptions |
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> |
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.
|
GetAuthenticationTokenOptions |
setExpiresAfter(Duration expiresAfter)
Specifies when the duration after which the requested authentication token will expire.
|
GetAuthenticationTokenOptions |
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.
|
GetAuthenticationTokenOptions |
setUserId(String userId)
Specifies the user ID to be used when creating the authentication token.
|
public GetAuthenticationTokenOptions setExpiresAfter(Duration expiresAfter)
expiresAfter
- The duration after which the requested authentication token will expire.public Duration getExpiresAfter()
public GetAuthenticationTokenOptions addRole(String role)
role
- The role to be added to the requested authentication token.public GetAuthenticationTokenOptions setRoles(List<String> roles)
roles
- The complete set of roles to be included when creating the authentication token.public List<String> getRoles()
public GetAuthenticationTokenOptions setUserId(String userId)
userId
- The user ID to be used when creating the authentication token.public String getUserId()
Copyright © 2021 Microsoft Corporation. All rights reserved.