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

Create ErrJWTInvalid to allow modify error when JWT is invalid #1627

Merged
merged 1 commit into from Sep 1, 2020
Merged

Create ErrJWTInvalid to allow modify error when JWT is invalid #1627

merged 1 commit into from Sep 1, 2020

Conversation

juanbelieni
Copy link
Contributor

@juanbelieni juanbelieni commented Aug 27, 2020

I was missing an option to change the message and code when JWT is invalid. So i created this variable that can be modified with a custom message and code.

@codecov
Copy link

codecov bot commented Aug 27, 2020

Codecov Report

Merging #1627 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1627   +/-   ##
=======================================
  Coverage   85.08%   85.08%           
=======================================
  Files          28       28           
  Lines        2185     2185           
=======================================
  Hits         1859     1859           
  Misses        212      212           
  Partials      114      114           
Impacted Files Coverage Δ
middleware/jwt.go 76.84% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8dd25c3...09f36b5. Read the comment docs.

@FatalReadError
Copy link

FatalReadError commented Aug 28, 2020

See also #1552

@lammel
Copy link
Contributor

lammel commented Sep 1, 2020

Although the HTTPErrorHandler could be used for this (as described in #1552) IMHO this PR improves code readability and consistency.

Thanks @juanbelieni

@lammel lammel merged commit 28ec3f7 into labstack:master Sep 1, 2020
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

3 participants