public final class AzureSasCredentialPolicy extends Object implements HttpPipelinePolicy
AzureSasCredential
to set the shared access signature for a request.Constructor and Description |
---|
AzureSasCredentialPolicy(AzureSasCredential credential)
Creates a policy that uses the passed
AzureSasCredential to append sas to query string. |
AzureSasCredentialPolicy(AzureSasCredential credential,
boolean requireHttps)
Creates a policy that uses the passed
AzureSasCredential to append sas to query string. |
Modifier and Type | Method and Description |
---|---|
Mono<HttpResponse> |
process(HttpPipelineCallContext context,
HttpPipelineNextPolicy next)
Processes provided request context and invokes the next policy.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPipelinePosition
public AzureSasCredentialPolicy(AzureSasCredential credential)
AzureSasCredential
to append sas to query string.
Requests sent with this pipeline policy are required to use HTTPS
.
If the request isn't using HTTPS
an exception will be thrown to prevent leaking the shared access signature.
credential
- The AzureSasCredential
containing the shared access signature to use.NullPointerException
- If credential
is null
.public AzureSasCredentialPolicy(AzureSasCredential credential, boolean requireHttps)
AzureSasCredential
to append sas to query string.credential
- The AzureSasCredential
containing the shared access signature to use.requireHttps
- A flag indicating whether HTTPS
is required.NullPointerException
- If credential
is null
.public Mono<HttpResponse> process(HttpPipelineCallContext context, HttpPipelineNextPolicy next)
HttpPipelinePolicy
process
in interface HttpPipelinePolicy
context
- The request context.next
- The next policy to invoke.Copyright © 2021 Microsoft Corporation. All rights reserved.