Package com.azure.messaging.webpubsub
Class WebPubSubAuthenticationPolicy
java.lang.Object
com.azure.messaging.webpubsub.WebPubSubAuthenticationPolicy
- All Implemented Interfaces:
HttpPipelinePolicy
An
HttpPipelinePolicy
for authenticating against the Azure Web Pub Sub service. Used in the default HTTP
pipeline when built using the WebPubSubServiceClientBuilder
, but available here in case an HTTP pipeline is built
outside of the WebPubSubServiceClientBuilder
.- See Also:
-
Constructor Summary
ConstructorDescriptionWebPubSubAuthenticationPolicy
(AzureKeyCredential credential) Creates a new instance of the WebPubSubAuthenticationPolicy, where it will make use of the providedAzureKeyCredential
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. -
Method Summary
Modifier and TypeMethodDescriptionprocess
(HttpPipelineCallContext context, HttpPipelineNextPolicy next) Processes provided request context and invokes the next policy.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.core.http.policy.HttpPipelinePolicy
getPipelinePosition, processSync
-
Constructor Details
-
WebPubSubAuthenticationPolicy
Creates a new instance of the WebPubSubAuthenticationPolicy, where it will make use of the providedAzureKeyCredential
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.- Parameters:
credential
- TheAzureKeyCredential
that will be used for all outgoing HTTP requests to the Azure Web Pub Sub service.
-
-
Method Details
-
process
Processes provided request context and invokes the next policy.- Specified by:
process
in interfaceHttpPipelinePolicy
- Parameters:
context
- The request context.next
- The next policy to invoke.- Returns:
- A publisher that initiates the request upon subscription and emits a response on completion.
-