Skip to content

Commit 7262928

Browse files
authored
Identity readme updates for more clarity upfront (Azure#13416)
This PR updates the readme for Identity with details on the different authentication options upfront. This makes it easier to link to this page from Azure#13403 instead of going through the same text there I have used the Java and .Net readmes for Azure Identity along with Azure#12878 as reference
1 parent a9245b7 commit 7262928

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

sdk/identity/identity/README.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
11
## Azure Identity client library for JavaScript
22

3-
This library simplifies authentication against Azure Active Directory for Azure SDK libraries.
4-
It provides a set of `TokenCredential` implementations which can be passed into SDK libraries
5-
to authenticate API requests. It supports token authentication using an Azure Active Directory [service principal](https://docs.microsoft.com/cli/azure/create-an-azure-service-principal-azure-cli) or [managed identity](https://docs.microsoft.com/azure/active-directory/managed-identities-azure-resources/overview).
3+
The Azure Identity library provides Azure Active Directory token authentication support across the Azure SDK. It provides a set of [TokenCredential](https://docs.microsoft.com/javascript/api/@azure/core-auth/tokencredential) implementations which can be used to construct Azure SDK clients which support AAD token authentication.
4+
5+
This library currently provides credentials for:
6+
7+
- [Service principal authentication](https://docs.microsoft.com/azure/active-directory/develop/app-objects-and-service-principals)
8+
- [Managed identity authentication](https://docs.microsoft.com/azure/active-directory/managed-identities-azure-resources/overview)
9+
- [Device code authentication](https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-device-code)
10+
- Interactive browser authentication, based on OAuth2 authentication code that uses the default system browser.
11+
- [Username + password authentication](https://docs.microsoft.com/azure/active-directory/develop/v2-oauth-ropc)
12+
- Visual Studio Code authentication, with the login information saved in Azure plugin for Visual Studio Code
13+
- Azure CLI authentication, with the login information saved in Azure CLI
14+
15+
[Source code](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/identity/identity) | [Package (npm)](https://www.npmjs.com/package/@azure/identity) | [API Reference Documentation](https://docs.microsoft.com/javascript/api/@azure/identity) | [Product documentation](https://azure.microsoft.com/services/active-directory/) | [Samples](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples)
616

717
## Getting started
818

@@ -21,9 +31,9 @@ npm install --save @azure/identity
2131
- You can sign up for a [free account](https://azure.microsoft.com/free/).
2232
- The [Azure CLI][azure_cli] can also be useful for authenticating in a development environment, creating accounts, and managing account roles.
2333

24-
### Authenticate the client
34+
### Authenticate the client in development environment
2535

26-
When debugging and executing code locally it is typical for a developer to use their own account for authenticating calls to Azure services. There are several developer tools which can be used to perform this authentication in your development environment.
36+
While we recommend using managed identity or service principal authentication in your production application, it is typical for a developer to use their own account for authenticating calls to Azure services when debugging and executing code locally. There are several developer tools which can be used to perform this authentication in your development environment.
2737

2838
#### Authenticating via Visual Studio Code
2939

@@ -45,6 +55,10 @@ For systems without a default web browser, the `az login` command will use the d
4555

4656
![Azure CLI Account Device Code Sign In][azureclilogindevicecode_image]
4757

58+
### Authenticate the client in browsers
59+
60+
To authenticate Azure SDKs within web browsers, we currently offer the `InteractiveBrowserCredential`, which can be set to use redirection or popups to complete the authentication flow. It is necessary to [create an Azure App Registration](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) in the portal for your web application first.
61+
4862
## Key concepts
4963

5064
If this is your first time using `@azure/identity` or the Microsoft identity platform (Azure Active Directory), we recommend that you read [Using `@azure/identity` with Microsoft Identity Platform](https://github.com/Azure/azure-sdk-for-js/blob/master/documentation/using-azure-identity.md) first. This document will give you a deeper understanding of the platform and how to configure your Azure account correctly.

0 commit comments

Comments
 (0)