-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Enable ESP to invoke Firebase Security rules. #54
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
Changes from 9 commits
348f061
6339697
13caf68
b0e48c7
6f10a20
c6ae0fa
01b50bf
1a6704c
6351cfa
32d0023
75d6e7a
b573770
9887846
7a2abe7
b871e40
71c0d92
50955e3
35a61df
4ef505a
9dddcac
c35348d
4ccc606
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -699,12 +699,20 @@ grpc_jwt_verifier_status JwtValidatorImpl::FillUserInfoAndSetExp( | |
|
|
||
| // Optional field. | ||
| const grpc_json *grpc_json = grpc_jwt_claims_json(claims_); | ||
|
|
||
| /*for (grpc_json *cur = json->child; cur != nullptr; cur = cur->next) { | ||
| user_info->claims.emplace(std::string(cur->key), std::string(cur->value)); | ||
| } */ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what is this commented out code for? If no needed, remove it
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed. |
||
|
|
||
| char *json_str = | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you. Missed this while addressing review comments. I was freeing this in the first commit :-) |
||
| grpc_json_dump_to_string(const_cast<::grpc_json *>(grpc_json), 0); | ||
| user_info->claims = json_str == nullptr ? "" : json_str; | ||
|
|
||
| const char *email = GetStringValue(grpc_json, "email"); | ||
| user_info->email = email == nullptr ? "" : email; | ||
| const char *authorized_party = GetStringValue(grpc_json, "azp"); | ||
| user_info->authorized_party = | ||
| authorized_party == nullptr ? "" : authorized_party; | ||
|
|
||
| exp_ = system_clock::from_time_t(grpc_jwt_claims_expires_at(claims_).tv_sec); | ||
|
|
||
| return GRPC_JWT_VERIFIER_OK; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you include ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed.