Hyperledger-Composer: Issuing identity using REST-API results in error message “fabric-ca request register failed”

不问归期 提交于 2019-12-07 15:53:59

问题


I have created a hyperledger-composer application with an Angular frontend and multi-user authentication.

The admin can create a new participant and issue an identity for this participant.

Adding the participant to the network works fine. But the second step - issuing an identity for this new participant results in the following error message:

 "message": "fabric-ca request register failed with errors [[{\"code\":20,\"message\":\"Authorization failure\"}]]",

... see the following screenshots:

and

The method causing this error message is the following:

 createBusinessNetworkCardFile(idOfNewParticipant: string): Promise<any> {

    let identity = {
        participant: org.comp.app# + idOfNewParticipant,
        userID: idOfNewParticipant,
        options: {}
    };

    return this.httpClient.post('/api/system/identities/issue', identity, {responseType: 'blob'}).toPromise()
    .then(cardData => {

        this.businessNetworkCardFile = new File([cardData], 'businessNetworkCard.card', {type: 'application/octet-stream', lastModified: Date.now()});
        //some more code

    });

  }

来源:https://stackoverflow.com/questions/51882586/hyperledger-composer-issuing-identity-using-rest-api-results-in-error-message

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!