Skip to content

oak-http: extract Authorization Field parsing and add test coverage#2981

Merged
reschke merged 2 commits into
trunkfrom
OAK-12284
Jun 26, 2026
Merged

oak-http: extract Authorization Field parsing and add test coverage#2981
reschke merged 2 commits into
trunkfrom
OAK-12284

Conversation

@reschke

@reschke reschke commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Reviewers: not that this code is a demo project / POC only.

@github-actions

Copy link
Copy Markdown

Commit-Check ✔️

@reschke reschke requested review from mbaedke and rishabhdaim June 26, 2026 12:02
@rishabhdaim

rishabhdaim commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

@reschke so the scope of this PR is just to refactor the code and handle a case where some might have added more values in Authorization header, correct ?

We are not fixing the original issue reported in OAK-12259.

@rishabhdaim rishabhdaim left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just a on comment on a test case.

Rest is fine with me.

Comment on lines +54 to +55
assertEquals("foo", credentials.getUserID());
assertEquals("bar", new String(credentials.getPassword()));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

exception would be thrown from above line.

These 2 are not reachable.

how about we add Assert.fail("shouldn't reach here") here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

they may become reachable later on.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

fine +1

@reschke

reschke commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

yes, this just adds test coverage for the existing behavior; bugs will be fixed separately.

@reschke reschke changed the title oak-http: extract Authorization Field parsing and add test coveragen Field parsing and add test coverage oak-http: extract Authorization Field parsing and add test coverage Jun 26, 2026
@sonarqubecloud

Copy link
Copy Markdown

@reschke reschke merged commit a6f8448 into trunk Jun 26, 2026
5 checks passed
@reschke reschke deleted the OAK-12284 branch June 26, 2026 14:15
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