WebPubSubServiceClient.GetClientAccessUri 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
GetClientAccessUri(TimeSpan, String, IEnumerable<String>, IEnumerable<String>, WebPubSubClientProtocol, CancellationToken) |
Creates a URI with authentication token for the clients. |
GetClientAccessUri(DateTimeOffset, String, IEnumerable<String>, IEnumerable<String>, WebPubSubClientProtocol, CancellationToken) |
Creates a URI with authentication token for the clients. |
GetClientAccessUri(TimeSpan, String, IEnumerable<String>, IEnumerable<String>, WebPubSubClientProtocol, CancellationToken)
Creates a URI with authentication token for the clients.
public virtual Uri GetClientAccessUri (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 GetClientAccessUri : TimeSpan * string * seq<string> * seq<string> * Azure.Messaging.WebPubSub.WebPubSubClientProtocol * System.Threading.CancellationToken -> Uri
override this.GetClientAccessUri : TimeSpan * string * seq<string> * seq<string> * Azure.Messaging.WebPubSub.WebPubSubClientProtocol * System.Threading.CancellationToken -> Uri
Public Overridable Function GetClientAccessUri (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 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
GetClientAccessUri(DateTimeOffset, String, IEnumerable<String>, IEnumerable<String>, WebPubSubClientProtocol, CancellationToken)
Creates a URI with authentication token for the clients.
public virtual Uri GetClientAccessUri (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 GetClientAccessUri : DateTimeOffset * string * seq<string> * seq<string> * Azure.Messaging.WebPubSub.WebPubSubClientProtocol * System.Threading.CancellationToken -> Uri
override this.GetClientAccessUri : DateTimeOffset * string * seq<string> * seq<string> * Azure.Messaging.WebPubSub.WebPubSubClientProtocol * System.Threading.CancellationToken -> Uri
Public Overridable Function GetClientAccessUri (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 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