Skip to content

Commit

Permalink
SDK version update changes (Azure-Samples#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
ravithanneeru authored Sep 15, 2021
1 parent d22c2cd commit acb7278
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 37 deletions.
10 changes: 5 additions & 5 deletions OutboundCallReminder/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core</artifactId>
<version>1.17.0</version>
<version>1.19.0</version>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-identity</artifactId>
<version>1.2.3</version>
<version>1.3.5</version>
</dependency>
<dependency>
<groupId>com.azure</groupId>
Expand All @@ -70,7 +70,7 @@
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-communication-callingserver</artifactId>
<version>1.0.0-beta.2</version>
<version>1.0.0-beta.3</version>
</dependency>
<dependency>
<groupId>com.microsoft.cognitiveservices.speech</groupId>
Expand All @@ -80,12 +80,12 @@
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-messaging-eventgrid</artifactId>
<version>4.3.0</version>
<version>4.6.0</version>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-cosmos</artifactId>
<version>4.14.0</version>
<version>4.18.0</version>
</dependency>
</dependencies>

Expand Down
6 changes: 3 additions & 3 deletions PhoneNumbers/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-communication-phonenumbers</artifactId>
<version>1.0.0</version>
<version>1.0.3</version>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-communication-common</artifactId>
<version>1.0.0</version>
<version>1.0.3</version>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-identity</artifactId>
<version>1.2.3</version>
<version>1.3.5</version>
</dependency>
</dependencies>

Expand Down
12 changes: 6 additions & 6 deletions ServerRecording/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-storage-blob</artifactId>
<version>12.6.0</version>
<version>12.13.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand All @@ -45,17 +45,17 @@
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-identity</artifactId>
<version>1.2.3</version>
<version>1.3.5</version>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-communication-callingserver</artifactId>
<version>1.0.0-beta.2</version>
<version>1.0.0-beta.3</version>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core</artifactId>
<version>1.17.0</version>
<version>1.19.0</version>
</dependency>
<dependency>
<groupId>com.microsoft.cognitiveservices.speech</groupId>
Expand All @@ -65,12 +65,12 @@
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-messaging-eventgrid</artifactId>
<version>4.4.0</version>
<version>4.6.0</version>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-cosmos</artifactId>
<version>4.14.0</version>
<version>4.18.0</version>
</dependency>
</dependencies>
<repositories>
Expand Down
2 changes: 1 addition & 1 deletion access-token-quickstart/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-communication-identity</artifactId>
<version>1.0.0</version>
<version>1.1.1</version>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,26 @@ public static void main( String[] args ) throws IOException
System.out.println("\nIssued an access token with 'voip' scope that expires at: " + expiresAt + ": " + token);

//Create an identity and issue token in one call
List<CommunicationTokenScope> scopes = Arrays.asList(CommunicationTokenScope.CHAT);
CommunicationUserIdentifierAndToken result = communicationIdentityClient.createUserAndToken(scopes);
CommunicationUserIdentifier user = result.getUser();
System.out.println("\nCreated a user identity with ID: " + user.getId());
AccessToken accessToken = result.getUserToken();
OffsetDateTime expiresAt = accessToken.getExpiresAt();
String token = accessToken.getToken();
System.out.println("\nIssued an access token with 'chat' scope that expires at: " + expiresAt + ": " + token);
List<CommunicationTokenScope> scope = Arrays.asList(CommunicationTokenScope.CHAT);
CommunicationUserIdentifierAndToken result = communicationIdentityClient.createUserAndToken(scope);
CommunicationUserIdentifier userIdentifier = result.getUser();
System.out.println("\nCreated a user identity with ID: " + userIdentifier.getId());
AccessToken userTokenResult = result.getUserToken();
OffsetDateTime expiresTime = userTokenResult.getExpiresAt();
String userToken = userTokenResult.getToken();
System.out.println("\nIssued an access token with 'chat' scope that expires at: " + expiresTime + ": " + userToken);

// Refresh access tokens - existingIdentity represents identity of Azure Communication Services stored during identity creation
CommunicationUserIdentifier identity = new CommunicationUserIdentifier(user.getId());
AccessToken response = communicationIdentityClient.getToken(identity, scopes);
CommunicationUserIdentifier identity = new CommunicationUserIdentifier(userIdentifier.getId());
AccessToken response = communicationIdentityClient.getToken(identity, scope);

// Revoke access tokens
communicationIdentityClient.revokeTokens(user);
System.out.println("\nSuccessfully revoked all access tokens for user identity with ID: " + user.getId());
communicationIdentityClient.revokeTokens(userIdentifier);
System.out.println("\nSuccessfully revoked all access tokens for user identity with ID: " + userIdentifier.getId());

// Delete an identity
communicationIdentityClient.deleteUser(user);
System.out.println("\nDeleted the user identity with ID: " + user.getId());
communicationIdentityClient.deleteUser(userIdentifier);
System.out.println("\nDeleted the user identity with ID: " + userIdentifier.getId());

}
}
4 changes: 2 additions & 2 deletions chat-quickstart-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-communication-chat</artifactId>
<version>1.0.0</version>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-communication-common</artifactId>
<version>1.0.0</version>
<version>1.0.3</version>
</dependency>
</dependencies>

Expand Down
6 changes: 3 additions & 3 deletions send-sms-quickstart/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-communication-sms</artifactId>
<version>1.0.0</version>
<version>1.0.3</version>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-http-netty</artifactId>
<version>1.8.0</version>
<version>1.10.1</version>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core</artifactId>
<version>1.13.0</version> <!-- {x-version-update;com.azure:azure-core;dependency} -->
<version>1.19.0</version> <!-- {x-version-update;com.azure:azure-core;dependency} -->
</dependency>
</dependencies>

Expand Down
6 changes: 3 additions & 3 deletions use-managed-Identity/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-communication-identity</artifactId>
<version>1.0.0</version>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-communication-sms</artifactId>
<version>1.0.0</version>
<version>1.0.3</version>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-identity</artifactId>
<version>1.2.3</version>
<version>1.3.5</version>
</dependency>
</dependencies>

Expand Down

0 comments on commit acb7278

Please sign in to comment.