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

JwtVerifyHandler needs to handle properly the value returned by the Config module #70

Closed
ddobrin opened this issue Jan 30, 2019 · 2 comments
Assignees

Comments

@ddobrin
Copy link
Contributor

ddobrin commented Jan 30, 2019

The Handler, in isEnabled(), needs to handle the isEnabld flag regardless if it is returned as an Object or primitive boolean.

Change is:
@OverRide
public boolean isEnabled() {
Object object = config.get(JwtHelper.ENABLE_VERIFY_JWT);
return object != null && Boolean.valueOf(object.toString()) ;
}

@ddobrin ddobrin self-assigned this Jan 30, 2019
ddobrin added a commit that referenced this issue Jan 30, 2019
@stevehu
Copy link
Contributor

stevehu commented Jan 30, 2019

@ddobrin This is a very good catch. The old code is based on a very restricted assumption and is error-prone. If this works, we need to review other handlers as there are a lot of enabled flags. Also, we might need to review other data types other than strings. Thanks.

@stevehu
Copy link
Contributor

stevehu commented Feb 6, 2019

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

No branches or pull requests

2 participants