-
Notifications
You must be signed in to change notification settings - Fork 31
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
feat: Self Attested Claims (VCs) - id_token & custom scope #1505
feat: Self Attested Claims (VCs) - id_token & custom scope #1505
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1505 +/- ##
=======================================
Coverage 85.22% 85.22%
=======================================
Files 166 166
Lines 10596 10643 +47
=======================================
+ Hits 9030 9071 +41
- Misses 1136 1139 +3
- Partials 430 433 +3
☔ View full report in Codecov by Sentry. |
@@ -602,6 +603,21 @@ func (f *Flow) createIDToken( | |||
return idTokenJSON, nil | |||
} | |||
|
|||
func (f *Flow) extractAdditionalClaims(requestObjectScope string) map[string]Claims { |
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.
As discussed, for the testing purpose wallet-cli returns random claims and does not considers custom scope value.
CC: @sudeshrshetty @vkubiv
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.
@mishasizov-SK What do you mean by random? Any?
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.
@vkubiv as aligned with @sudeshrshetty.
This logic will be extended/changed.
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.
I am not sure what you mean, you can pre-configure wallet CLI with pre-defined "scope:claim", and ask the exact scope while testing.
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.
@sudeshrshetty updated
// If custom scope was requested, but no relevant additional claims were supplied by Holder. | ||
noAdditionalClaims := tx.CustomScope != "" && len(authResponse.CustomScopeClaims[tx.CustomScope]) == 0 | ||
// If custom scope was not requested, but additional claims were supplied by Holder. | ||
unexpectedAdditionalClaims := tx.CustomScope == "" && len(authResponse.CustomScopeClaims) != 0 | ||
|
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.
Verifier checks if additional claims supplied for given scope.
c3b6801
to
7ad1fae
Compare
Signed-off-by: Mykhailo Sizov <mykhailo.sizov@securekey.com>
7ad1fae
to
b97098f
Compare
No description provided.