这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@ZIMkaRU
Copy link
Member

@ZIMkaRU ZIMkaRU commented Mar 23, 2023

This PR adds login/verify proxy endpoints to resolve the CORS issue for the dev mode of the BFX username/pwd auth for the following links:


loginToBFX request example

{
  "method": "loginToBFX",
  "params": {
    "login": "user-name",
    "password": "user-pwd"
  }
}

loginToBFX response example

{
  "jsonrpc": "2.0",
  "result": [
    "12345678-8888-4321-1234-8cb090a01360",
    [
      [
        "otp",
        true
      ]
    ]
  ],
  "id": null
}

loginToBFX response example if wrong login

{
  "jsonrpc": "2.0",
  "error": {
    "code": 401,
    "message": "Unauthorized",
    "data": null
  },
  "id": null
}

verifyOnBFX request example

{
  "method": "verifyOnBFX",
  "params": {
    "loginToken": "12345678-8888-4321-1234-8cb090a01360",
    "token": "123456",
    "verifyMethod": "otp"
  }
}

verifyOnBFX response example

{
  "jsonrpc": "2.0",
  "result": [
    "pub:api:12345678-9999-5555-1234-5499998e10ff-caps:s:o:f:w:wd:a-write",
    "2023-03-21T12:00:00.000Z"
  ],
  "id": null
}

verifyOnBFX response example if wrong token

{
  "jsonrpc": "2.0",
  "error": {
    "code": 401,
    "message": "Unauthorized",
    "data": null
  },
  "id": null
}

Depends on this PR:

Copy link
Contributor

@ezewer ezewer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants