Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Communication] - Chat - Bug: Fixed chat tests issue token renaming issue #16786

Merged
merged 1 commit into from
Feb 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion sdk/communication/azure-communication-chat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pip install --pre azure-communication-identity
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"])
tokenresponse = identity_client.get_token(user, scopes=["chat"])
token = tokenresponse.token
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class ChatClientSamples(object):

identity_client = CommunicationIdentityClient.from_connection_string(connection_string)
user = identity_client.create_user()
tokenresponse = identity_client.issue_token(user, scopes=["chat"])
tokenresponse = identity_client.get_token(user, scopes=["chat"])
token = tokenresponse.token

endpoint = os.environ.get("AZURE_COMMUNICATION_SERVICE_ENDPOINT", None)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class ChatClientSamplesAsync(object):

identity_client = CommunicationIdentityClient.from_connection_string(connection_string)
user = identity_client.create_user()
tokenresponse = identity_client.issue_token(user, scopes=["chat"])
tokenresponse = identity_client.get_token(user, scopes=["chat"])
token = tokenresponse.token

endpoint = os.environ.get("AZURE_COMMUNICATION_SERVICE_ENDPOINT", None)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class ChatThreadClientSamples(object):

identity_client = CommunicationIdentityClient.from_connection_string(connection_string)
user = identity_client.create_user()
tokenresponse = identity_client.issue_token(user, scopes=["chat"])
tokenresponse = identity_client.get_token(user, scopes=["chat"])
token = tokenresponse.token

endpoint = os.environ.get("AZURE_COMMUNICATION_SERVICE_ENDPOINT", None)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ChatThreadClientSamplesAsync(object):

identity_client = CommunicationIdentityClient.from_connection_string(connection_string)
user = identity_client.create_user()
tokenresponse = identity_client.issue_token(user, scopes=["chat"])
tokenresponse = identity_client.get_token(user, scopes=["chat"])
token = tokenresponse.token

endpoint = os.environ.get("AZURE_COMMUNICATION_SERVICE_ENDPOINT", None)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def setUp(self):

# create user and issue token
self.user = self.identity_client.create_user()
tokenresponse = self.identity_client.issue_token(self.user, scopes=["chat"])
tokenresponse = self.identity_client.get_token(self.user, scopes=["chat"])
self.token = tokenresponse.token

# create ChatClient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def setUp(self):

# create user
self.user = self.identity_client.create_user()
token_response = self.identity_client.issue_token(self.user, scopes=["chat"])
token_response = self.identity_client.get_token(self.user, scopes=["chat"])
self.token = token_response.token

# create ChatClient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ def setUp(self):

# create user and issue token
self.user = self.identity_client.create_user()
tokenresponse = self.identity_client.issue_token(self.user, scopes=["chat"])
tokenresponse = self.identity_client.get_token(self.user, scopes=["chat"])
self.token = tokenresponse.token

# create another user
self.new_user = self.identity_client.create_user()
tokenresponse = self.identity_client.issue_token(self.new_user, scopes=["chat"])
tokenresponse = self.identity_client.get_token(self.new_user, scopes=["chat"])
self.token_new_user = tokenresponse.token

# create ChatClient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ def setUp(self):

# create user 1
self.user = self.identity_client.create_user()
token_response = self.identity_client.issue_token(self.user, scopes=["chat"])
token_response = self.identity_client.get_token(self.user, scopes=["chat"])
self.token = token_response.token

# create user 2
self.new_user = self.identity_client.create_user()
token_response = self.identity_client.issue_token(self.new_user, scopes=["chat"])
token_response = self.identity_client.get_token(self.new_user, scopes=["chat"])
self.token_new_user = token_response.token

# create ChatClient
Expand Down