Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
6f3989a
initial commit: new folder for identity
beltr0n Jan 21, 2021
791c80c
Merge pull request #7 from beltr0n/bertong-extract-identity
lsundaralingam Jan 21, 2021
9c5f2c7
Added root files to identity package
lsundaralingam Jan 22, 2021
c3a8e26
Merge pull request #8 from lsundaralingam/communication-identity-pers…
lsundaralingam Jan 22, 2021
58fc9eb
copy identity client files from admin to new pkg
beltr0n Jan 22, 2021
9801f74
add autorest generated files
beltr0n Jan 22, 2021
f661bab
Merge pull request #9 from beltr0n/bertong-extract-identity
lsundaralingam Jan 22, 2021
1141676
copy samples over
beltr0n Jan 22, 2021
bbda113
update references in other packages
beltr0n Jan 22, 2021
70f4beb
Merge pull request #10 from beltr0n/bertong-extract-identity
lsundaralingam Jan 22, 2021
98902d8
Added tests to identity package
lsundaralingam Jan 22, 2021
c2bffd7
Merge pull request #11 from lsundaralingam/communication-identity-per…
lsundaralingam Jan 22, 2021
fdbd228
remove identity code from admin package
beltr0n Jan 22, 2021
63c3468
update changelog
beltr0n Jan 22, 2021
c089d7a
remove identity code from admin package
beltr0n Jan 22, 2021
418abcd
update changelog
beltr0n Jan 22, 2021
7fc6eba
Merge branch 'bertong-extract-identity' of github.com:beltr0n/azure-s…
beltr0n Jan 22, 2021
d2af3ea
Merge pull request #12 from beltr0n/bertong-extract-identity
lsundaralingam Jan 22, 2021
96734b4
Removed identity tests from admin package
lsundaralingam Jan 22, 2021
5e5bc28
Merge pull request #13 from lsundaralingam/communication-identity-per…
lsundaralingam Jan 22, 2021
09b1d29
Update admin readme
beltr0n Jan 22, 2021
b876e20
add back version.py for wheel generation
beltr0n Jan 22, 2021
5ab5308
Removed user credential test in admin package
lsundaralingam Jan 22, 2021
2882314
Merge pull request #14 from beltr0n/bertong-extract-identity
lsundaralingam Jan 22, 2021
57b784f
Merge pull request #15 from lsundaralingam/communication-identity-per…
lsundaralingam Jan 22, 2021
e8cec64
update _version.py
beltr0n Jan 22, 2021
549c082
remove redundant files
beltr0n Jan 22, 2021
ea95e1e
fixed error with init file
beltr0n Jan 22, 2021
282204c
minor naming fixes
beltr0n Jan 22, 2021
cdbac44
only expose required shared models
beltr0n Jan 22, 2021
8b41ee8
Merge pull request #16 from beltr0n/bertong-extract-identity
lsundaralingam Jan 22, 2021
1f07e2b
Update chat to reference new identity package
beltr0n Jan 22, 2021
a1a39c2
Merge pull request #17 from beltr0n/bertong-extract-identity
lsundaralingam Jan 22, 2021
5741e0b
Updated identity test recordings
lsundaralingam Jan 22, 2021
c4aa835
Merge pull request #18 from lsundaralingam/communication-identity-per…
lsundaralingam Jan 22, 2021
d459029
Added examples to identity README.md
lsundaralingam Jan 22, 2021
67eb267
Merge pull request #19 from lsundaralingam/communication-identity-per…
lsundaralingam Jan 22, 2021
ab8c2b3
Updated dependencies in identity package
lsundaralingam Jan 22, 2021
f52a08c
Updated code style to meet pylint requirements
lsundaralingam Jan 23, 2021
4ecbdd0
update swagger + re-generate code
beltr0n Jan 23, 2021
c600031
Merge pull request #20 from beltr0n/bertong-communication-identity-re…
lsundaralingam Jan 23, 2021
586f727
update with latest swagger and regen
beltr0n Jan 23, 2021
b49dc04
Merge pull request #21 from beltr0n/bertong-communication-identity-re…
lsundaralingam Jan 23, 2021
563a908
async client changes for new api
beltr0n Jan 23, 2021
bc1b2a2
Updated sync identity client
lsundaralingam Jan 23, 2021
6d1a081
Merge pull request #22 from beltr0n/bertong-communication-identity-re…
lsundaralingam Jan 23, 2021
438233b
Merge pull request #23 from lsundaralingam/communication-identity-red…
lsundaralingam Jan 23, 2021
f56c773
Updated CommunicationTokenRequest to CommunicationIdentityAccessToken…
lsundaralingam Jan 25, 2021
8583748
Merge pull request #24 from lsundaralingam/communication-identity-red…
lsundaralingam Jan 25, 2021
02d2112
pylint fixes
beltr0n Jan 25, 2021
5e096b8
Merge pull request #25 from beltr0n/bertong-communication-identity-re…
lsundaralingam Jan 25, 2021
de04ea9
Fixed pylint issues
lsundaralingam Jan 25, 2021
f1b4e5f
Merged in pylint fixes
lsundaralingam Jan 25, 2021
aefa4c1
Merge pull request #26 from lsundaralingam/communication-identity-red…
lsundaralingam Jan 25, 2021
5f262cc
Fixed create user method and updated test recordings
lsundaralingam Jan 28, 2021
b38895a
Merge pull request #28 from lsundaralingam/communication-identity-red…
lsundaralingam Jan 28, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## 1.0.0b4 (Unreleased)

### Breaking Changes
- CommunicationIdentityClient is moved to a new package: "azure.communication.identity"

##### `PhoneNumberAdministrationClient`
- `begin_reserve_phone_numbers` now takes `display_name`, `description`, `phone_plan_ids`,
Expand Down
36 changes: 3 additions & 33 deletions sdk/communication/azure-communication-administration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Azure Communication Administration Package client library for Python

Azure Communication Administration client package is intended to be used to setup the basics for opening a way to use Azure Communication Service offerings. This package helps to create identities user tokens to be used by other client packages such as chat, calling, sms.
Azure Communication Administration client package is used to administer Phone Numbers.

# Getting started
### Prerequisites
Expand All @@ -17,31 +17,6 @@ pip install azure-communication-administration
```

# Key concepts
## CommunicationIdentityClient
`CommunicationIdentityClient` provides operations for:

- Create/delete identities to be used in Azure Communication Services. Those identities can be used to make use of Azure Communication offerings and can be scoped to have limited abilities through token scopes.

- Create/revoke scoped user access tokens to access services such as chat, calling, sms. Tokens are issued for a valid Azure Communication identity and can be revoked at any time.

### Initializing Identity Client
```python
# You can find your endpoint and access token from your resource in the Azure Portal
import os
from azure.communication.administration import CommunicationIdentityClient
from azure.identity import DefaultAzureCredential

connection_str = os.getenv('AZURE_COMMUNICATION_SERVICE_CONNECTION_STRING')
endpoint = os.getenv('AZURE_COMMUNICATION_SERVICE_ENDPOINT')

# To use Azure Active Directory Authentication (DefaultAzureCredential) make sure to have
# AZURE_TENANT_ID, AZURE_CLIENT_ID and AZURE_CLIENT_SECRET as env variables.
identity_client_managed_identity = CommunicationIdentityClient.(endpoint, DefaultAzureCredential())

#You can also authenticate using your connection string
identity_client = CommunicationIdentityClient.from_connection_string(connection_str)

```

## CommunicationPhoneNumberClient
### Initializing Phone Number Client
Expand Down Expand Up @@ -70,10 +45,6 @@ Phone numbers can be assigned to a callback URL via the configure number API. As
# Examples
The following section provides several code snippets covering some of the most common Azure Communication Services tasks, including:

[Create/delete Azure Communication Service identities][identitysamples]

[Create/revoke scoped user access tokens][identitysamples]

## Communication Phone number
### Get Countries

Expand Down Expand Up @@ -179,12 +150,12 @@ poller = phone_number_administration_client.begin_purchase_reservation(
```

# Troubleshooting
The Azure Communication Service Identity client will raise exceptions defined in [Azure Core][azure_core].
The Phone Number Administration client will raise exceptions defined in [Azure Core][azure_core].

# Next steps
## More sample code

Please take a look at the [samples](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/communication/azure-communication-administration/samples) directory for detailed examples of how to use this library to manage identities and tokens.
Please take a look at the [samples](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/communication/azure-communication-administration/samples) directory for detailed examples of how to use this library.

## Provide Feedback

Expand All @@ -201,5 +172,4 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.

<!-- LINKS -->
[identitysamples]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/communication/azure-communication-administration/samples/identity_samples.py
[azure_core]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/core/azure-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,9 @@
# license information.
# --------------------------------------------------------------------------

from ._communication_identity_client import CommunicationIdentityClient
from ._phone_number_administration_client import PhoneNumberAdministrationClient
from ._polling import ReservePhoneNumberPolling, PurchaseReservationPolling, ReleasePhoneNumberPolling

from ._identity._generated.models import (
CommunicationTokenRequest,
CommunicationIdentityToken
)

from ._phonenumber._generated.models import (
AcquiredPhoneNumber,
AcquiredPhoneNumbers,
Expand Down Expand Up @@ -42,16 +36,11 @@
)

__all__ = [
'CommunicationIdentityClient',
'PhoneNumberAdministrationClient',
'ReservePhoneNumberPolling',
'PurchaseReservationPolling',
'ReleasePhoneNumberPolling',

# from _identity
'CommunicationTokenRequest',
'CommunicationIdentityToken',

# from _phonenumber
'AcquiredPhoneNumber',
'AcquiredPhoneNumbers',
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
from ._communication_identity_client_async import CommunicationIdentityClient
from ._phone_number_administration_client_async import PhoneNumberAdministrationClient
from ._polling_async import ReservePhoneNumberPollingAsync, \
PurchaseReservationPollingAsync, \
ReleasePhoneNumberPollingAsync

__all__ = [
'CommunicationIdentityClient',
'PhoneNumberAdministrationClient',
'ReservePhoneNumberPollingAsync',
'PurchaseReservationPollingAsync',
Expand Down
Loading