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

MYST-114 sign all mysterium api rest calls #93

Merged
merged 2 commits into from Jan 11, 2018

Conversation

Projects
None yet
2 participants
@tadovas
Copy link
Member

commented Jan 11, 2018

No description provided.

func (mApi *mysteriumApi) NodeRegister(proposal dto_discovery.ServiceProposal) error {
req, err := newPostRequest("node_register", dto.NodeRegisterRequest{
func (mApi *mysteriumApi) RegisterProposal(proposal dto_discovery.ServiceProposal, signer identity.Signer) error {
req, err := newSignedPostRequest("node_register", dto.NodeRegisterRequest{

This comment has been minimized.

Copy link
@donce

donce Jan 11, 2018

Contributor

This renaming makes sense! Could you rename the url of discovery-api as well? Calling same endpoint 2 different names looks very confusing.

FindProposals(nodeKey string) (proposals []dto_discovery.ServiceProposal, err error)
//these functions have side effects - therefore signer required

This comment has been minimized.

Copy link
@donce

donce Jan 11, 2018

Contributor

Signer is not required only because these functions have side-effects:
In the future we might have GET endpoints without side-effects, which requires authorization.
What about this?

//these functions are signed because they require authorization

This comment has been minimized.

Copy link
@tadovas

tadovas Jan 11, 2018

Author Member

Looks better. Fixed

@donce

donce approved these changes Jan 11, 2018

@tadovas tadovas merged commit 1f9f3d7 into master Jan 11, 2018

@tadovas tadovas deleted the feature/MYST-114-sign-mysterium-api-leftovers branch Jan 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.