Class AzureKeyCredential

java.lang.Object
com.azure.core.credential.KeyCredential
com.azure.core.credential.AzureKeyCredential

public final class AzureKeyCredential extends KeyCredential

The AzureKeyCredential is used to authenticate and authorize requests made to Azure services. It is specifically designed for scenarios where you need to authenticate using a key.

A key is a unique identifier or token that is associated with a specific user or application. It serves as a simple form of authentication to ensure that only authorized clients can access the protected resources or APIs. This authentication is commonly used for accessing certain services, such as Azure Cognitive Services, Azure Search, or Azure Management APIs. Each service may have its own specific way of using API keys, but the general concept remains the same. The AzureKeyCredential allows you to authenticate using a key.

Code Samples

Create a key credential for a service key.

 AzureKeyCredential azureKeyCredential = new AzureKeyCredential("AZURE-SERVICE-KEY");
 
See Also: