-
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: Credential Status API - update vc status #890
feat: Credential Status API - update vc status #890
Conversation
@@ -150,8 +150,20 @@ type Crypto struct { | |||
documentLoader ld.DocumentLoader | |||
} | |||
|
|||
// SignCredentialLDP adds verifiable.LinkedDataProofContext to the vc. | |||
func (c *Crypto) SignCredentialLDP( | |||
func (c *Crypto) SignCredential( |
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.
created a generic method instead of SignCredentialLDP
and SignCredentialJWT
Signed-off-by: Mykhailo Sizov <[email protected]>
30ca3b6
to
a6fa11b
Compare
Codecov ReportBase: 87.44% // Head: 87.42% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #890 +/- ##
==========================================
- Coverage 87.44% 87.42% -0.02%
==========================================
Files 72 72
Lines 3862 3904 +42
==========================================
+ Hits 3377 3413 +36
- Misses 309 315 +6
Partials 176 176
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
@@ -114,5 +115,5 @@ func (s *Service) sendHTTPRequest(req *http.Request, status int, token string) ( | |||
return nil, fmt.Errorf("failed to read response body for status %d: %s", resp.StatusCode, string(body)) | |||
} | |||
|
|||
return body, nil | |||
return bytes.Trim(body, "\n"), nil |
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 we need trim here
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.
ctx.JSON(), ctx.String() and similar methods from echo adds \n
to the end of payload body.
For LDP VC it's ok, but for jwt it makes problems in decoding.
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.
will be fixed in the next PR
closes: #834
closes: #826
Signed-off-by: Mykhailo Sizov [email protected]