Package com.azure.messaging.webpubsub
Class WebPubSubAuthenticationPolicy
- java.lang.Object
-
- com.azure.messaging.webpubsub.WebPubSubAuthenticationPolicy
-
- All Implemented Interfaces:
com.azure.core.http.policy.HttpPipelinePolicy
public final class WebPubSubAuthenticationPolicy extends Object implements com.azure.core.http.policy.HttpPipelinePolicy
AnHttpPipelinePolicyfor authenticating against the Azure Web Pub Sub service. Used in the default HTTP pipeline when built using theWebPubSubServiceClientBuilder, but available here in case an HTTP pipeline is built outside of theWebPubSubServiceClientBuilder.- See Also:
WebPubSubServiceClientBuilder
-
-
Constructor Summary
Constructors Constructor Description WebPubSubAuthenticationPolicy(com.azure.core.credential.AzureKeyCredential credential)Creates a new instance of the WebPubSubAuthenticationPolicy, where it will make use of the providedAzureKeyCredentialwhenever a HTTP request is made to apply the appropriate modifications to the HTTP request to gain access to the Azure Web Pub Sub service.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Mono<com.azure.core.http.HttpResponse>process(com.azure.core.http.HttpPipelineCallContext context, com.azure.core.http.HttpPipelineNextPolicy next)
-
-
-
Constructor Detail
-
WebPubSubAuthenticationPolicy
public WebPubSubAuthenticationPolicy(com.azure.core.credential.AzureKeyCredential credential)
Creates a new instance of the WebPubSubAuthenticationPolicy, where it will make use of the providedAzureKeyCredentialwhenever 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.- Parameters:
credential- TheAzureKeyCredentialthat will be used for all outgoing HTTP requests to the Azure Web Pub Sub service.
-
-
Method Detail
-
process
public Mono<com.azure.core.http.HttpResponse> process(com.azure.core.http.HttpPipelineCallContext context, com.azure.core.http.HttpPipelineNextPolicy next)
- Specified by:
processin interfacecom.azure.core.http.policy.HttpPipelinePolicy
-
-