use of com.bsnbase.sdk.entity.req.fabric.ReqUserRegister in project PCNGateway-Java-SDK by BSNDA.
the class UserService method userRegister.
/**
* User registration
* <p>
* In both key trust mode and public key upload mode, when the user is participating in the Fabric application and needs to create a separate user transaction certificate for the sub-user of the off-chain system, it is necessary to call this interface first to register the user in this city node, and the user's username is name@appCode in the call parameter.
*/
public static ResUserRegister userRegister(ReqUserRegister register) throws IOException {
String api = Config.config.getApi() + PathUtil.FABRIC_USER_REGISTER;
BaseReqModel<ReqUserRegister> req = new BaseReqModel<ReqUserRegister>();
req.setReqHeader(Config.config.getUserCode(), Config.config.getAppCode());
req.setBody(register);
HttpService<ReqUserRegister, ResUserRegister> httpService = new HttpService<ReqUserRegister, ResUserRegister>();
BaseResModel<ResUserRegister> res = httpService.post(req, api, ResUserRegister.class);
ResUserRegister body = res.getBody();
return body;
}
Aggregations