-
Notifications
You must be signed in to change notification settings - Fork 242
Add route to lookup identity by DID #617
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
Conversation
See hyperledger#583 Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
| o, r := newTestAPIServer() | ||
| nmn := &networkmapmocks.Manager{} | ||
| o.On("NetworkMap").Return(nmn) | ||
| req := httptest.NewRequest("GET", "/api/v1/network/did?did=did:firefly:org/org_1", 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.
See this looks weird 🙃
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.
Was reading https://w3c-ccg.github.io/did-resolution/#example-0
Wondering about:
/api/v1/network/identities/did:firefly:org/org_1
I think that could work. Given @awrichar is out on vacation, I might make this proposal in code for @nguyer to review.
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.
Ok - that's done @nguyer, including sorting the swagger generator so it can handle the custom Gorilla mux syntax.
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Codecov Report
@@ Coverage Diff @@
## main #617 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 309 310 +1
Lines 18705 18720 +15
=========================================
+ Hits 18705 18720 +15
Continue to review full report at Codecov.
|
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
…s by DID/org-name in identity registration Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
|
Made a couple more enhancements:
|
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
| @@ -0,0 +1,42 @@ | |||
| // Copyright © 2021 Kaleido, Inc. | |||
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'm surprised the linter didn't complain about the year here
Signed-off-by: Nicko Guyer <nicko.guyer@kaleido.io>
See #583
This is more of a starting point - the functionality works, but I'm pretty certain the API spelling is not what we want.
I was struggling with the best way to provide this functionality - it seems like it must be a query param, because
/is a valid char for query params but not for path params. Assuming we do use a query param, it would also be nice to flag it as "required" from the Swagger perspective.Side note: you can already query the
/namespaces/{ns}/identitiesendpoint with a query param fordid, but you have to know the namespace you're looking for in that case.