You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sdk/communication/azure-communication-common/CHANGELOG.md
+26-2Lines changed: 26 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,14 @@
4
4
5
5
### Features Added
6
6
7
+
- Added new constructor with required param `tokenRefresher` for `CommunicationTokenRefreshOptions`
8
+
- Deprecated old constructor overloads in `CommunicationTokenRefreshOptions` and replaced by fluent setters
9
+
- Added fluent setters for optional properties:
10
+
- Added `setRefreshProactively(boolean refreshProactively)` setter that allows setting whether the token should be proactively renewed prior to its expiry or on demand.
11
+
- Added `setInitialToken(String initialToken)` setter that allows setting the optional serialized JWT token
12
+
- Added a synchronous token refresher getter `getTokenRefresherSync` for `CommunicationTokenRefreshOptions`
13
+
- Optimization added: When the proactive refreshing is enabled and the token refresher fails to provide a token that's not about to expire soon, the subsequent refresh attempts will be scheduled for when the token reaches half of its remaining lifetime until a token with long enough validity (>10 minutes) is obtained.
`PhoneNumberIdentifier`, `UnknownIdentifier`, are all final classes now.
75
92
76
93
## 1.0.0-beta.5 (2021-03-02)
94
+
77
95
- Updated `azure-communication-common` version
78
96
79
97
## 1.0.0-beta.4 (2021-02-09)
98
+
80
99
### Breaking Changes
100
+
81
101
- Renamed `CommunicationUserCredential` to `CommunicationTokenCredential`
82
102
- Replaced constructor `CommunicationTokenCredential(TokenRefresher tokenRefresher, String initialToken, boolean refreshProactively)` and `CommunicationTokenCredential(TokenRefresher tokenRefresher)` with `CommunicationTokenCredential(CommunicationTokenRefreshOptions tokenRefreshOptions)`
83
103
- Renamed `PhoneNumber` to `PhoneNumberIdentifier`
84
-
- Renamed `CommunicationUser` to `CommunicationUserIdentifier`
104
+
- Renamed `CommunicationUser` to `CommunicationUserIdentifier`
85
105
- Renamed `CallingApplication` to `CallingApplicationIdentifier`
86
106
87
107
### Added
108
+
88
109
- Added `MicrosoftTeamsUserIdentifier`
89
110
90
111
## 1.0.0-beta.3 (2020-11-16)
112
+
91
113
Updated `azure-communication-common` version
92
114
93
115
## 1.0.0-beta.2 (2020-10-06)
116
+
94
117
Updated `azure-communication-common` version
95
118
96
119
## 1.0.0-beta.1 (2020-09-22)
120
+
97
121
This package contains common code for Azure Communication Service libraries. For more information, please see the [README][read_me].
98
122
99
123
This is a Public Preview version, so breaking changes are possible in subsequent releases as we improve the product. To provide feedback, please submit an issue in our [Azure SDK for Java GitHub repo](https://github.com/Azure/azure-sdk-for-java/issues).
Copy file name to clipboardExpand all lines: sdk/communication/azure-communication-common/README.md
+41-11Lines changed: 41 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,7 @@ and then include the direct dependency in the dependencies section without the v
42
42
```
43
43
44
44
#### Include direct dependency
45
+
45
46
If you want to take dependency on a particular version of the library that is not present in the BOM,
46
47
add the direct dependency to your project as follows.
47
48
@@ -57,29 +58,50 @@ add the direct dependency to your project as follows.
57
58
58
59
## Key concepts
59
60
60
-
To work with Azure Communication Services, a resource access key is used for authentication.
61
+
To work with Azure Communication Services, a resource access key is used for authentication.
61
62
62
63
Azure Communication Service supports HMAC authentication with resource access key. To
63
-
apply HMAC authentication, construct CommunicationClientCredential with the access key and instantiate
64
-
a CommunicationIdentityClient to manage users and tokens.
64
+
apply HMAC authentication, construct `CommunicationClientCredential` with the access key and instantiate
65
+
a `CommunicationIdentityClient` to manage users and tokens.
65
66
66
67
### CommunicationTokenCredential
67
68
68
-
It is up to you the developer to first create valid user tokens with the Communication Identity SDK. Then you use these tokens with the `CommunicationTokenCredential`.
69
+
The `CommunicationTokenCredential` object is used to authenticate a user with Communication Services, such as Chat or Calling. It optionally provides an auto-refresh mechanism to ensure a continuously stable authentication state during communications.
69
70
70
-
`CommunicationTokenCredential` authenticates a user with Communication Services, such as Chat or Calling. It optionally provides an auto-refresh mechanism to ensure a continuously stable authentication state during communications.
71
+
Depending on your scenario, you may want to initialize the `CommunicationTokenCredential` with:
71
72
72
-
## Contributing
73
+
- a static token (suitable for short-lived clients used to e.g. send one-off Chat messages) or
74
+
- a callback function that ensures a continuous authentication state (ideal e.g. for long Calling sessions).
73
75
74
-
This project welcomes contributions and suggestions. Most contributions require you to agree to a [Contributor License Agreement (CLA)][cla] declaring that you have the right to, and actually do, grant us the rights to use your contribution.
76
+
The tokens supplied to the `CommunicationTokenCredential` either through the constructor or via the token refresher callback can be obtained using the Azure Communication Identity library.
75
77
76
-
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
78
+
## Examples
77
79
78
-
This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact [opencode@microsoft.com][coc_contact]with any additional questions or comments.
80
+
### Create a credential with a static token
79
81
80
-
## Examples
82
+
For short-lived clients, refreshing the token upon expiry is not necessary and `CommunicationTokenCredential` may be instantiated with a static token.
Check out other client libraries for Azure communication service
91
113
114
+
## Contributing
115
+
116
+
This project welcomes contributions and suggestions. Most contributions require you to agree to a [Contributor License Agreement (CLA)][cla] declaring that you have the right to, and actually do, grant us the rights to use your contribution.
117
+
118
+
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
119
+
120
+
This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact [opencode@microsoft.com][coc_contact] with any additional questions or comments.
Copy file name to clipboardExpand all lines: sdk/communication/azure-communication-common/src/main/java/com/azure/communication/common/CommunicationTokenCredential.java
0 commit comments