API Reference
Index
NewOntLoginSdk
Creates an OntLoginSdk instance.
Parameters
SDKConfig
SDK configuration
public class SDKConfig {
String[] chain; // Supported chain, e.g."ONT","ETH","BSC"
String[] alg; // Signature scheme such as "ES256","Ed25519"
ServerInfo serverInfo; // Server configuration info, see details below
Map<Integer, VCFilter[]> vcFilters; // VCFilter info for authentication/authorization, see details below
}Map<string,DidProcessor>
DID processor map
@Override
public String genRandomNonceFunc(Integer action)
Function to generate nonce
@Override
public Integer getActionByNonce(String nonce)
Gets action by nonce
Returns
OntLoginSdk
GenerateChallenge
Generates the challenge.
Parameters
Returns
ServerHello
ValidateClientResponse
Validates the response from the client.
Parameters
Returns
Field
Description
null
Validation successful
Validation Process:
Verify the validity of parameters
Verify if the nonce is the same as the one generated by the server
verify the signature
Verify the validity of VP and VC
Check if the provided VC meets the requirement
GetCredentialJson
Gets JSON string of VC from VP.
Parameters
Parameter
Description
chain
Chain name
presentation
VP string
Returns
Field
Description
[]string
JSON string of VC
Last updated