KeyCredentialPolicy(KeyCredential, String, String) Constructor
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.
Initializes a new instance of the KeyCredentialPolicy class.
public KeyCredentialPolicy(System.Net.ClientModel.KeyCredential credential, string name, string? prefix = default);
new System.Net.ClientModel.Core.Pipeline.KeyCredentialPolicy : System.Net.ClientModel.KeyCredential * string * string -> System.Net.ClientModel.Core.Pipeline.KeyCredentialPolicy
Public Sub New (credential As KeyCredential, name As String, Optional prefix As String = Nothing)
Parameters
- credential
- KeyCredential
The KeyCredential used to authenticate requests.
- name
- String
The name of the key header used for the credential.
- prefix
- String
The prefix to apply before the credential key. For example, a prefix of "SharedAccessKey" would result in
a value of "SharedAccessKey {credential.Key}" being stamped on the request header with header key of name.