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

Authenticator: remove jwt.Validate #91

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

drakkan
Copy link
Contributor

@drakkan drakkan commented Jun 9, 2024

jwt.Validate is already called in Verifier, no need to call it twice.

If jwt.Validate fails in Verifier, the error is set in the context and the Authenticator retrieves the token and error from the context.

jwt.Validate is already called in Verifier, no need to call it
twice
Copy link
Contributor

@VojtechVitek VojtechVitek left a comment

Choose a reason for hiding this comment

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

LGTM. Makes sense.

Already called in Verifier:

jwtauth/jwtauth.go

Lines 114 to 116 in 127ee7c

if err := jwt.Validate(token, ja.validateOptions...); err != nil {
return token, ErrorReason(err)
}

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