-
Notifications
You must be signed in to change notification settings - Fork 647
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
Login API issues #2614
Milestone
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Description
login_api::login
API call will create all API objects, even if none of them is used later. It is better to only create the corresponding API object the first time an API is requested.database
API set can not be avoided even with theapi-access
optionlogin_api::database
API call will create a newdatabase_api
object, which is unnecessary since there is already one registered (according to docs, it has ID0
).too few arguments passed to method
:curl -d '{"id":1,"method":"call","params":["login","database",[ ]]}' http://localhost:8090/
But this API call will succeed:
curl -d '{"id":1,"method":"call","params":[1,"database",[ ]]}' http://localhost:8090/
It means we can not use the name "login" when calling an API in the
login_api
API set (but we can do that withdatabase_api
,history_api
and etc). Although it doesn't matter at the moment, it will be inconvenient when we adding new APIs inlogin_api
.The reason is that
login_api::login
is used for login but not for retrieving the ID oflogin_api
itself.login_api::login("*","*")
is called by default on each new connection with no username or password supplied (this is a feature). As a result, the documentation sayinglogin
must be called first is no longer true. Task: update documentation.Note: #2618 was originally reported here but we can not fix it at the moment.
Impacts
Describe which portion(s) of BitShares Core may be impacted by this bug. Please tick at least one box.
Host Environment
Please provide details about the host environment. Much of this information can be found running:
witness_node --version
.CORE TEAM TASK LIST
The text was updated successfully, but these errors were encountered: