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

Trharris/authenticate https #2270

Merged
merged 14 commits into from Apr 29, 2024
Merged

Trharris/authenticate https #2270

merged 14 commits into from Apr 29, 2024

Conversation

TrevorJoelHarris
Copy link
Contributor

For more information about how to contribute to this repo, visit this page.

Description

authentication.authenticate will now throw an error if any url that is not https is passed into it. This should have already been the case and it not being enforced in TeamsJS is a bug.

Main changes in the PR:

  1. Updated authentication.authenticate to throw an error if a non-https url is passed to it
  2. Restructured authentication.authenticate to make it clear that there were only 2 case: HostClientType.web || !HostClientType.web
  3. Removed unnecessary and duplicative unit tests from authentication code
  4. Fixed a bug in utils.initializeWithContext (a test only function) where many people were passing in an undefined HostClientType which can cause various weirdness during test execution. That function now has a default HostClientType value if one is not passed in.

Validation

Validation performed:

  1. Ran all unit tests

Unit Tests added:

Yes

End-to-end tests added:

No

Additional Requirements

Change file added:

Yes

@TrevorJoelHarris TrevorJoelHarris requested a review from a team as a code owner April 17, 2024 00:07
ydogandjiev
ydogandjiev previously approved these changes Apr 17, 2024
Copy link
Contributor

@AE-MS AE-MS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕐

AE-MS
AE-MS previously approved these changes Apr 26, 2024
Copy link
Contributor

@AE-MS AE-MS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

erinha
erinha previously approved these changes Apr 26, 2024
Copy link
Contributor

@AE-MS AE-MS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@TrevorJoelHarris TrevorJoelHarris merged commit d5e118c into main Apr 29, 2024
21 checks passed
@TrevorJoelHarris TrevorJoelHarris deleted the trharris/authenticateHttps branch April 29, 2024 17:38
alexneyman-MSFT pushed a commit that referenced this pull request May 6, 2024
* Restrict authentication.authenticate to only accept https urls

* Create @microsoft-teams-js-40968a44-8220-4162-a289-038e99f5bee3.json

* Updated based on PR feedback

* Updated to use new validation functions and added(?) support for URL encoded strings

* abstract out the auth code's use of the a tag and then add tests to make sure URL encoded partial urls work correctly

* Re-order imports

* Updated based on PR feedback

---------

Co-authored-by: AE ( ͡ಠ ʖ̯ ͡ಠ) <36546967+AE-MS@users.noreply.github.com>
alexneyman-MSFT pushed a commit that referenced this pull request May 9, 2024
* Restrict authentication.authenticate to only accept https urls

* Create @microsoft-teams-js-40968a44-8220-4162-a289-038e99f5bee3.json

* Updated based on PR feedback

* Updated to use new validation functions and added(?) support for URL encoded strings

* abstract out the auth code's use of the a tag and then add tests to make sure URL encoded partial urls work correctly

* Re-order imports

* Updated based on PR feedback

---------

Co-authored-by: AE ( ͡ಠ ʖ̯ ͡ಠ) <36546967+AE-MS@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants