23 строки
5.5 KiB
YAML
23 строки
5.5 KiB
YAML
### YamlMime:JavaPackage
|
|
uid: "com.azure.core.credential"
|
|
fullName: "com.azure.core.credential"
|
|
name: "com.azure.core.credential"
|
|
summary: "Azure Core Credential library is designed to simplify the process of authenticating and authorizing access to Azure services from Java applications."
|
|
classes:
|
|
- "com.azure.core.credential.AccessToken"
|
|
- "com.azure.core.credential.AzureKeyCredential"
|
|
- "com.azure.core.credential.AzureNamedKey"
|
|
- "com.azure.core.credential.AzureNamedKeyCredential"
|
|
- "com.azure.core.credential.AzureSasCredential"
|
|
- "com.azure.core.credential.BasicAuthenticationCredential"
|
|
- "com.azure.core.credential.KeyCredential"
|
|
- "com.azure.core.credential.ProofOfPossessionOptions"
|
|
- "com.azure.core.credential.SimpleTokenCache"
|
|
- "com.azure.core.credential.TokenRequestContext"
|
|
interfaces:
|
|
- "com.azure.core.credential.TokenCredential"
|
|
desc: "Azure Core Credential library is designed to simplify the process of authenticating and authorizing access to Azure services from Java applications. The SDK provides a set of classes and methods that handle authentication and credential management, allowing developers to securely connect to Azure services without dealing with the low-level details of authentication protocols.\n\nThe library provides a unified way to obtain credentials for various Azure authentication mechanisms, such as Azure Active Directory (AAD), shared access signatures, and API keys. It abstracts the complexities of authentication and provides a consistent programming model for accessing Azure services.\n\nBy using the library, users can easily integrate Azure authentication into their applications, retrieve the required credentials based on the desired authentication method, and use those credentials to authenticate requests to Azure services like Azure Storage, Azure Key Vault, Azure Service Bus, and more.\n\nThe library offers several authentication types for authenticating with Azure services. Here are some of the authentication mechanisms supported by the library:\n\n * Azure Active Directory (AAD) Authentication\n * Shared Access Signature (SAS) Authentication\n * Key Based Authentication\n\n## Azure Active Directory (AAD) Authentication ##\n\nThis type of authentication allows you to authenticate using Azure Active Directory and obtain a token to access Azure resources. You can authenticate with AAD using client secrets, client certificates, or user credentials. The library offers <xref uid=\"com.azure.core.credential.TokenCredential\" data-throw-if-not-resolved=\"false\" data-raw-source=\"com.azure.core.credential.TokenCredential\"></xref> interface which is accepted as an argument on the client builders in Azure SDKs where AAD authentication is supported. You can refer to and include our [Azure Identity][] library in your application as it offers pluggable implementation of <xref uid=\"com.azure.core.credential.TokenCredential\" data-throw-if-not-resolved=\"false\" data-raw-source=\"com.azure.core.credential.TokenCredential\"></xref> for various AAD based authentication mechanism including service principal, managed identity, and more.\n\n\n--------------------\n\n## Shared Access Signature (SAS) Authentication ##\n\nShared Access Signatures enable you to grant time-limited access to Azure resources. The library offers <xref uid=\"com.azure.core.credential.AzureSasCredential\" data-throw-if-not-resolved=\"false\" data-raw-source=\"com.azure.core.credential.AzureSasCredential\"></xref> which allows you to authenticate using a shared access signature, which is a string-based token that grants access to specific resources for a specific period.\n\n**Sample: Azure SAS Authentication**\n\nThe following code sample demonstrates the creation of a <xref uid=\"com.azure.core.credential.AzureSasCredential\" data-throw-if-not-resolved=\"false\" data-raw-source=\"com.azure.core.credential.AzureSasCredential\"></xref>, using the sas token to configure it.\n\n```java\nAzureSasCredential azureSasCredential =\n new AzureSasCredential(\"AZURE-SERVICE-SAS-KEY\");\n```\n\n\n--------------------\n\n## Key Based Authentication ##\n\nA 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 library offers <xref uid=\"com.azure.core.credential.AzureKeyCredential\" data-throw-if-not-resolved=\"false\" data-raw-source=\"com.azure.core.credential.AzureKeyCredential\"></xref> and <xref uid=\"com.azure.core.credential.AzureNamedKeyCredential\" data-throw-if-not-resolved=\"false\" data-raw-source=\"com.azure.core.credential.AzureNamedKeyCredential\"></xref> which can allows you to authenticate using a key.\n\n**Sample: Azure Key Authentication**\n\nThe following code sample demonstrates the creation of a <xref uid=\"com.azure.core.credential.AzureKeyCredential\" data-throw-if-not-resolved=\"false\" data-raw-source=\"com.azure.core.credential.AzureKeyCredential\"></xref>, using the Azure service key to configure it.\n\n```java\nAzureKeyCredential azureKeyCredential = new AzureKeyCredential(\"AZURE-SERVICE-KEY\");\n```\n\n\n[Azure Identity]: https://learn.microsoft.com/java/api/overview/azure/identity-readme?view=azure-java-stable"
|
|
metadata: {}
|
|
package: "com.azure.core.credential"
|
|
artifact: com.azure:azure-core:1.54.0
|