public final class WebPubSubAuthenticationPolicy extends Object implements com.azure.core.http.policy.HttpPipelinePolicy
HttpPipelinePolicy
for authenticating against the Azure Web Pub Sub service. Used in the default HTTP
pipeline when built using the WebPubSubClientBuilder
, but available here in case an HTTP pipeline is built
outside of the WebPubSubClientBuilder
.WebPubSubClientBuilder
Constructor and Description |
---|
WebPubSubAuthenticationPolicy(com.azure.core.credential.AzureKeyCredential credential)
Creates a new instance of the WebPubSubAuthenticationPolicy, where it will make use of the provided
AzureKeyCredential whenever a HTTP request is made to apply the appropriate modifications to the HTTP
request to gain access to the Azure Web Pub Sub service. |
Modifier and Type | Method and Description |
---|---|
Mono<com.azure.core.http.HttpResponse> |
process(com.azure.core.http.HttpPipelineCallContext context,
com.azure.core.http.HttpPipelineNextPolicy next) |
public WebPubSubAuthenticationPolicy(com.azure.core.credential.AzureKeyCredential credential)
AzureKeyCredential
whenever a HTTP request is made to apply the appropriate modifications to the HTTP
request to gain access to the Azure Web Pub Sub service.
Note that whilst the credential passed into the constructor is immutable within this policy, the key contained
within the credential is not, and as such can be updated by calling AzureKeyCredential.update(String)
as
appropriate.
credential
- The AzureKeyCredential
that will be used for all outgoing HTTP requests to the
Azure Web Pub Sub service.public Mono<com.azure.core.http.HttpResponse> process(com.azure.core.http.HttpPipelineCallContext context, com.azure.core.http.HttpPipelineNextPolicy next)
process
in interface com.azure.core.http.policy.HttpPipelinePolicy
Copyright © 2021 Microsoft Corporation. All rights reserved.