WebPubSubServiceClient.GetClientAccessUriAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetClientAccessUriAsync(TimeSpan, String, IEnumerable<String>, IEnumerable<String>, WebPubSubClientProtocol, CancellationToken) |
Creates a URI with authentication token for the clients. |
GetClientAccessUriAsync(DateTimeOffset, String, IEnumerable<String>, IEnumerable<String>, WebPubSubClientProtocol, CancellationToken) |
Creates a URI with authentication token for the clients.. |
GetClientAccessUriAsync(TimeSpan, String, IEnumerable<String>, IEnumerable<String>, WebPubSubClientProtocol, CancellationToken)
- Source:
- WebPubSubServiceClient.cs
Creates a URI with authentication token for the clients.
public virtual System.Threading.Tasks.Task<Uri> GetClientAccessUriAsync (TimeSpan expiresAfter = default, string userId = default, System.Collections.Generic.IEnumerable<string> roles = default, System.Collections.Generic.IEnumerable<string> groups = default, Azure.Messaging.WebPubSub.WebPubSubClientProtocol clientProtocol = Azure.Messaging.WebPubSub.WebPubSubClientProtocol.Default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetClientAccessUriAsync : TimeSpan * string * seq<string> * seq<string> * Azure.Messaging.WebPubSub.WebPubSubClientProtocol * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Uri>
override this.GetClientAccessUriAsync : TimeSpan * string * seq<string> * seq<string> * Azure.Messaging.WebPubSub.WebPubSubClientProtocol * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Uri>
Public Overridable Function GetClientAccessUriAsync (Optional expiresAfter As TimeSpan = Nothing, Optional userId As String = Nothing, Optional roles As IEnumerable(Of String) = Nothing, Optional groups As IEnumerable(Of String) = Nothing, Optional clientProtocol As WebPubSubClientProtocol = Azure.Messaging.WebPubSub.WebPubSubClientProtocol.Default, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Uri)
Parameters
- expiresAfter
- TimeSpan
Defaults to one hour, if not specified. Must be greater or equal zero.
- userId
- String
User Id.
- roles
- IEnumerable<String>
Roles that the connection with the generated token will have.
- groups
- IEnumerable<String>
Groups that the connection with the generated token will join when it connects.
- clientProtocol
- WebPubSubClientProtocol
The client protocol.
- cancellationToken
- CancellationToken
Cancellation token.
Returns
Applies to
GetClientAccessUriAsync(DateTimeOffset, String, IEnumerable<String>, IEnumerable<String>, WebPubSubClientProtocol, CancellationToken)
- Source:
- WebPubSubServiceClient.cs
Creates a URI with authentication token for the clients..
public virtual System.Threading.Tasks.Task<Uri> GetClientAccessUriAsync (DateTimeOffset expiresAt, string userId = default, System.Collections.Generic.IEnumerable<string> roles = default, System.Collections.Generic.IEnumerable<string> groups = default, Azure.Messaging.WebPubSub.WebPubSubClientProtocol clientProtocol = Azure.Messaging.WebPubSub.WebPubSubClientProtocol.Default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetClientAccessUriAsync : DateTimeOffset * string * seq<string> * seq<string> * Azure.Messaging.WebPubSub.WebPubSubClientProtocol * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Uri>
override this.GetClientAccessUriAsync : DateTimeOffset * string * seq<string> * seq<string> * Azure.Messaging.WebPubSub.WebPubSubClientProtocol * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Uri>
Public Overridable Function GetClientAccessUriAsync (expiresAt As DateTimeOffset, Optional userId As String = Nothing, Optional roles As IEnumerable(Of String) = Nothing, Optional groups As IEnumerable(Of String) = Nothing, Optional clientProtocol As WebPubSubClientProtocol = Azure.Messaging.WebPubSub.WebPubSubClientProtocol.Default, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Uri)
Parameters
- expiresAt
- DateTimeOffset
UTC time when the token expires.
- userId
- String
User Id.
- roles
- IEnumerable<String>
Roles that the connection with the generated token will have.
- groups
- IEnumerable<String>
Groups that the connection with the generated token will join when it connects.
- clientProtocol
- WebPubSubClientProtocol
The client protocol.
- cancellationToken
- CancellationToken
Cancellation token.
Returns
Applies to
Azure SDK for .NET