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

Add convenient AuthType.Basic and AuthType.Bearer type aliases #3020

Merged
merged 1 commit into from
Aug 16, 2024

Conversation

guizmaii
Copy link
Member

No description provided.

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.31%. Comparing base (e9f1c02) to head (b2e0ab2).
Report is 40 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3020      +/-   ##
==========================================
+ Coverage   64.78%   65.31%   +0.52%     
==========================================
  Files         157      155       -2     
  Lines        9395    10127     +732     
  Branches     1743     1886     +143     
==========================================
+ Hits         6087     6614     +527     
- Misses       3308     3513     +205     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@jdegoes jdegoes left a comment

Choose a reason for hiding this comment

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

Another way to do this:

sealed trait None extends AuthType { 
...
}
val None = new None {}

The advantage is that there is no de-aliasing of None / Basic / Bearer, so they will always appear in that form. The disadvantage is you have to implement your own consistent equals/hashCode/toString.

@jdegoes jdegoes merged commit 5151462 into main Aug 16, 2024
65 checks passed
@jdegoes jdegoes deleted the authType_types branch August 16, 2024 08:08
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.

3 participants