2. verify

    接口入参: com.webank.weid.protocol.base.Credential

    接口返回: com.webank.weid.protocol.response.ResponseData<Boolean>;

    此方法返回code

    调用示例

    (同时也包含verifyCredentialWithSpecifiedPubKey时序)

    sequenceDiagramparticipant 调用者participant CredentialServiceparticipant CptServiceparticipant WeIdServiceparticipant 区块链节点调用者->>CredentialService: 调用verify()或verifyCredentialWithSpecifiedPubKey()CredentialService->>CredentialService: 入参非空、格式及合法性检查opt 入参校验失败CredentialService—>>调用者: 报错,提示参数不合法并退出endCredentialService->>WeIdService: 查询WeIdentity DID存在性WeIdService->>区块链节点: 调用智能合约,查询WeIdentity DID属性区块链节点—>>WeIdService: 返回查询结果WeIdService—>>CredentialService: 返回查询结果opt 查询不存在CredentialService—>>调用者: 报错并退出endCredentialService->>CptService: 查询CPT存在性及Claim关联语义CptService->>区块链节点: 调用智能合约,查询CPT区块链节点—>>CptService: 返回查询结果CptService—>>CredentialService: 返回查询结果opt 不符合CPT格式要求CredentialService—>>调用者: 报错并退出endCredentialService->>CredentialService: 验证过期、撤销与否opt 任一验证失败CredentialService—>>调用者: 报错并退出endopt 未提供验签公钥CredentialService->>WeIdService: 查询Issuer对应公钥WeIdService->>区块链节点: 调用智能合约,查询Issuer的WeIdentity DID Document区块链节点—>>WeIdService: 返回查询结果WeIdService—>>CredentialService: 返回查询结果endCredentialService->>CredentialService: 通过公钥与签名对比,验证Issuer是否签发此凭证opt 验证签名失败CredentialService—>>调用者: 报错并退出endCredentialService—>>调用者: 返回成功