Skip to content

Commit

Permalink
Merge pull request Azure#17 from beltr0n/bertong-extract-identity
Browse files Browse the repository at this point in the history
Update chat to reference new identity package
  • Loading branch information
lsundaralingam authored Jan 22, 2021
2 parents 8b41ee8 + 1f07e2b commit a1a39c2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions sdk/communication/azure-communication-chat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ pip install --pre azure-communication-chat

## User Access Tokens

User access tokens enable you to build client applications that directly authenticate to Azure Communication Services. You can generate these tokens with azure.communication.administration module, and then use them to initialize the Communication Services SDKs. Example of using azure.communication.administration:
User access tokens enable you to build client applications that directly authenticate to Azure Communication Services. You can generate these tokens with azure.communication.identity module, and then use them to initialize the Communication Services SDKs. Example of using azure.communication.identity:

```bash
pip install --pre azure-communication-administration
pip install --pre azure-communication-identity
```

```python
from azure.communication.administration import CommunicationIdentityClient
from azure.communication.identity import CommunicationIdentityClient
identity_client = CommunicationIdentityClient.from_connection_string("<connection string of your Communication service>")
user = identity_client.create_user()
tokenresponse = identity_client.issue_token(user, scopes=["chat"])
Expand Down Expand Up @@ -374,7 +374,7 @@ to create a resource, then set some Environment Variables
set AZURE_COMMUNICATION_SERVICE_ENDPOINT="https://<RESOURCE_NAME>.communcationservices.azure.com"
set AZURE_COMMUNICATION_SERVICE_CONNECTION_STRING="<connection string of your Communication service>"

pip install azure-communication-administration
pip install azure-communication-identity

python samples\chat_client_sample.py
python samples\chat_client_sample_async.py
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-e ../../../tools/azure-devtools
-e ../../../tools/azure-sdk-tools
../azure-communication-nspkg
-e ../azure-communication-administration
-e ../azure-communication-identity
aiohttp>=3.0; python_version >= '3.5'

0 comments on commit a1a39c2

Please sign in to comment.