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

adding use basic auth scheme config #215

Merged
merged 2 commits into from
Sep 14, 2023

Conversation

uhunnyslack
Copy link
Contributor

@uhunnyslack uhunnyslack commented Sep 11, 2023

Summary

To support more connectors, 3p auth manifest config requires some more new SDK fields

This PR is to add a new field that helps the connector team unblock creating some more connectors.

token_url_config : { use_basic_authentication_scheme_scheme : boolean} to support providers that use this.

More discussions can be found in our slack instance.

closing this old PR for this.

Important

Please do not merge it until the web app changes are merged! Thanks!

Requirements (place an x in each [ ])

@uhunnyslack uhunnyslack requested a review from a team as a code owner September 11, 2023 22:57
@codecov
Copy link

codecov bot commented Sep 11, 2023

Codecov Report

Merging #215 (b01f2f8) into main (79afeb3) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #215   +/-   ##
=======================================
  Coverage   99.24%   99.24%           
=======================================
  Files          56       56           
  Lines        2128     2128           
  Branches      136      136           
=======================================
  Hits         2112     2112           
  Misses         15       15           
  Partials        1        1           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@uhunnyslack uhunnyslack changed the title adding type and comment adding use basic auth scheme config Sep 11, 2023
Copy link
Contributor

@WilliamBergamin WilliamBergamin left a comment

Choose a reason for hiding this comment

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

Looks good to me 💯 left one feedback on tests

const Manifest = new SlackManifest(definition);
const exportedManifest = Manifest.export();

assertEquals(exportedManifest.external_auth_providers, {
Copy link
Contributor

Choose a reason for hiding this comment

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

It might be good to isolate the different behaviors in separate test cases or separate test steps, this would aim to provide more context to the unit tests and help us in the future

Deno has this concept of test steps that allow to create steps inside a test, this feels like a good use case for this.

Maybe we could have one test with 3 steps that validate the behavior of basic_authentication_scheme when undefined, falsy and truthy?

Copy link
Contributor Author

@uhunnyslack uhunnyslack Sep 13, 2023

Choose a reason for hiding this comment

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

I did look at Deno tests steps but was thinking, maybe this is not about testing some chronological steps but just different possible values.
Since you have mentioned about providing more contexts about the tests, I have included some comments.
Hope this helps! Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

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

This does provide more context 💯

In the deno-slack-api we use this pattern for non chronological test mainly to reduce duplicate code, but for this test the additional comments should do the trick 🥇

@uhunnyslack uhunnyslack force-pushed the adding_basic_auth_encoding_scheme branch from d089179 to b01f2f8 Compare September 13, 2023 15:10
@uhunnyslack uhunnyslack requested review from zimeg and srajiang and removed request for srajiang September 13, 2023 17:06
Copy link
Contributor

@WilliamBergamin WilliamBergamin left a comment

Choose a reason for hiding this comment

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

:shipit:

@uhunnyslack uhunnyslack merged commit 544f54e into main Sep 14, 2023
11 checks passed
@uhunnyslack uhunnyslack deleted the adding_basic_auth_encoding_scheme branch September 14, 2023 14:17
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.

2 participants