Closed tophpalmer closed 2 years ago
👋🏻 @KrzysztofCwalina, @bterlson, @johanste, @JonathanGiles and @tjprescott
The identity service has released their 1.0 version and we are ready to release 1.0.0
of the SDK.
Here are the updated ApiViews based on all the comments from the review sessions:
Language | Common Package | Identity Package |
---|---|---|
.NET | 1.0.0.beta-4: ApiView + ReadMe | 1.0.0.beta-4: ApiView + ReadMe |
JS | 1.0.0.beta-5: ApiView + ReadMe | 1.0.0.beta-4: ApiView + ReadMe |
Java | 1.0.0.beta-4: ApiView + ReadMe | 1.0.0.beta-4: ApiView + ReadMe |
Python | N/A (Common code is part of the _shared folder of other packages) |
1.0.0b4: ApiView + ReadMe |
Android | 1.0.0.beta-5: ApiView + ReadMe | N/A (Identity is not intended to be used on clients) |
iOS | 1.0.0.beta-8: ApiView + ReadMe | N/A (Identity is not intended to be used on clients) |
Already approved and release completed last year
The Basics
About this client library
Access key HMAC auth
Finally, the Common library includes a
CommunicationAccessKeyCredentialPolicy
that uses a custom documented HMAC scheme for signing the request and providing the signature on the Authorization header.HMAC auth is used for the Communication SMS and Administration libraries, user auth is used for the Communication Chat and Calling libraries where all requests get sent on behalf of a single user.
Managed identities
We have recently added support for Managed Identities as well.
Communication user directory
Azure Communication Services supports a Bring-Your-Own-Identity scheme that isn't tied to identity providers such as Active Directory. The Communication Administration library and service provide a simple API to
The developer has to store a mapping between Communication user ids and their own identity models. It is up to the developer to manage the lifetime of a communication user, whether for long-lived scenarios (employee or customer directory) or for short-lived scenarios (a customer support chat, contact your delivery person).
User access token auth
The Common library further includes a
CommunicationTokenCredential
which is a wrapper around a Communication Service access token and provides auto-refresh mechanics. The developer can provide a callback that the credential then uses to request a new token. If a callback is provided, the credential will use the callback on-demand if the token has expired. Additionally, the developer can opt-in to refresh proactively. With proactive refresh, the credential uses a timer mechanism to request a new token before expiry. The user scenario for proactive refresh is connection stability where waiting for a token roundtrip could cause dropping calls.Developer flow to issue user access tokens
A typical flow involves the developer to implement their own server route to issue tokens. This route is guarded by whatever auth and identity mechanism the developer already uses, for example Google accounts or their own identity implementation. Then once authenticated, the route controller uses the Communication Administration library to issue a new Communication user access token and pass it down to the client. The client uses the token to instantiate or refresh the
CommunicationTokenCredential
.Docs for building a token issuer service with Azure Functions
Identifier types
The Communication Common library includes common types for identifiers that are used with the Communication libraries, for example phone numbers, calling applications or communication users. We expect the list of identifiers to grow over time, Microsoft Teams user types will be added soon.
Identifiers are a developer friendly model that hides the IC3 internal concept of a generic
MRI
(message resource identifier) in favor of a pre-defined set of different concrete types.Artifacts required (per language)
_shared
folder of other packages)Champion scenarios
A champion scenario is a use case that the consumer of the client library is commonly expected to perform. Champion scenarios are used to ensure the developer experience is exemplary for the common cases. You need to show the entire code sample (including error handling, as an example) for the champion scenarios.
Champion Scenario 1: Use
CommunicationIdentityClient
to createCommunicationUser
and issue tokenC
TypeScript
Java
Champion Scenario 2: Create
CommunicationTokenCredential
to provide user tokens in other clients likeChatClient
Champion Scenario 2A: Get Token String
C
TypeScript
Java
Swift
Champion Scenario 2B: Token from Callback With Proactive Refresh
C
TypeScript
Champion Scenario 3: Communication Identifiers appearing in other Clients like Chat
C
TypeScript
Java
Swift