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

Update Authentication approach and jsonwebtoken dependency #185

Merged
merged 1 commit into from
Jul 19, 2023

Conversation

jujaga
Copy link
Member

@jujaga jujaga commented Jul 13, 2023

Description

The jsonwebtoken library introduced a difficult to resolve fault with unit testing as of 9.0.0 where the decode function can no longer be spied or mocked. As the decode function is only really necessary if the publicKey is not specified, we instead reuse isValid's value when it is possible to do so instead.

SHOWCASE-3260

Types of changes

Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have read the CONTRIBUTING doc
  • I have checked that unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

@jujaga jujaga added bug Something isn't working dependencies Pull requests that update a dependency file labels Jul 13, 2023
@jujaga jujaga self-assigned this Jul 13, 2023
@codeclimate
Copy link

codeclimate bot commented Jul 13, 2023

Code Climate has analyzed commit 3042b73 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 80.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 60.8% (0.0% change).

View more on Code Climate.

@github-actions
Copy link

github-actions bot commented Jul 13, 2023

Coverage Report

Totals Coverage
Statements: 54.12% ( 2064 / 3814 )
Methods: 43.28% ( 235 / 543 )
Lines: 60.8% ( 1300 / 2138 )
Branches: 46.69% ( 529 / 1133 )

The jsonwebtoken library introduced a difficult to resolve fault with unit
testing as of 9.0.0 where the decode function can no longer be spied or
mocked. As the decode function is only really necessary if the publicKey
is not specified, we instead reuse isValid's value when it is possible to
do so instead.

Signed-off-by: Jeremy Ho <jujaga@gmail.com>
@TimCsaky TimCsaky merged commit 4f62586 into master Jul 19, 2023
12 checks passed
@jujaga jujaga deleted the security/jwt-keycloak branch July 19, 2023 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants