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

add jwt_add_grant_bool and jwt_get_grant_bool #49

Merged
merged 5 commits into from
Aug 14, 2017

Conversation

hamano
Copy link
Contributor

@hamano hamano commented Aug 14, 2017

No description provided.

@codecov-io
Copy link

codecov-io commented Aug 14, 2017

Codecov Report

Merging #49 into master will increase coverage by 0.16%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #49      +/-   ##
==========================================
+ Coverage   94.48%   94.65%   +0.16%     
==========================================
  Files           3        3              
  Lines         653      673      +20     
==========================================
+ Hits          617      637      +20     
  Misses         36       36
Impacted Files Coverage Δ
libjwt/jwt.c 92.45% <100%> (+0.37%) ⬆️

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 05c95fc...a1bafdc. Read the comment docs.

@benmcollins
Copy link
Owner

Please review decreased code coverage and try to address test cases to maintain the current level.

libjwt/jwt.c Outdated

js_val = json_object_get(js, key);
if (js_val)
val = (int)json_boolean_value(js_val);
Copy link
Owner

Choose a reason for hiding this comment

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

You're going to need to add something to define json_boolean_value for older JANSSON.

include/jwt.h Outdated
@@ -160,7 +160,8 @@ const char *jwt_get_grant(jwt_t *jwt, const char *grant);
* @param jwt Pointer to a JWT object.
* @param grant String containing the name of the grant to return a value
* for.
* @return Returns an int for the value, or 0 when not found.
* @return Returns an int for the value, with errno set ENOENT when
Copy link
Owner

Choose a reason for hiding this comment

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

Returns an int for the value. Sets errno to ENOENT when not found.

include/jwt.h Outdated
* for.
* @return Returns booean for the value, with errno set ENOENT when
* not found.
*
Copy link
Owner

Choose a reason for hiding this comment

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

Same as above comment (fix wording/grammar).

@benmcollins benmcollins merged commit 2bc9c36 into benmcollins:master Aug 14, 2017
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