DID
DID Login Process
1 Check if the address has a DID
Input Parameters:
Name | Type | Description | Required |
---|---|---|---|
address | String | wallet address | true |
Output Parameters:
SDNDIDListResponse
Name | Type | Description | Required |
---|---|---|---|
data | String | List of DIDs | true |
2 Log into a DID or register an address.
Choose DID or use the address to log in. If the interface array is empty, log in with the address. Otherwise, use the first element of the array as the 'did' parameter.
Input Parameters:
Name | Type | Description | Required |
---|---|---|---|
DID | String | DID string, choose either DID or wallet address | False |
address | String | wallet address, choose either DID or wallet address | False |
Output Parameters: PreloginResponse
Name | Type | Description | Required |
---|---|---|---|
DID | String | user DID (existed or newly created) | true |
message | String | message to be signed | true |
updated | String | update time | true |
random_server | string | nounce returned from the node | true |
3 Sign the message that was returned in step 2
Input Parameters: LoginRequest
Name | Type | Description | Required |
---|---|---|---|
type | String | Login type (current value: | true |
updated | String | update time returned by the | true |
identifier | IdentifierModel | login information | true |
device_id | String | device id, no need for new device | false |
IdentifierModel
Type:
Name | Type | Description |
---|---|---|
DID | String | User DID |
token | String | To sign the message returned by |
Output Parameters:
SDNDIDLoginResponse
Name | Type | Description | Required |
---|---|---|---|
access_token | String | access token | true |
user_id | String | user ID | true |
device_id | String | device id | true |
4 Log out
Input Parameters:
Name | Type | Description | Required |
---|---|---|---|
token | String | Login type (current value: | true |
Last updated