3 Star 0 Fork 0

区块链技术与应用联合实验室 / repchain-vc-rest-service

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
Apache-2.0

repchain-vc-rest-service

repchain-vc-rest-service,即基于RepChain区块链的可验证凭据(Verifiable Credential, VC)Rest Service,基于Spring Boot以Rest API的形式提供可验证凭据SDK的相应功能。

我们提供了以下语言版本的VC SDK:

- Java

若您使用的开发语言不在上述列表中,可考虑使用本Rest Service,通过Rest API形式使用VC SDK的相应功能以实现您的应用。

使用

依赖

  • 运行本程序需要提前安装JRE或JDK(Oracle发行版本或开源版本皆可, version > 1.8)。

配置

在配置文件config.yaml中编辑配置项:

配置项 值类型 说明
port number Rest服务端口
vc.vcconstractName String 可验证凭据管理合约名
vc.vcconstractVersion number 可验证凭据管理合约版本
vc.vcsignupCCSFunctionName String 注册可验证凭据属性结构所调用的合约方法名
vc.vcupdateCCSStatusFunctionName String 更改可验证凭据属性结构有效状态所调用的合约方法名
vc.vcsignupVCStatusFunctionName String 注册可验证凭据状态所调用的合约方法名
vc.vcupdateVCStatusFunctionName String 更改可验证凭据状态所调用的合约方法名
vc.vcrevokeVCClaimsFunctionName String 撤销可验证凭据部分属性所调用的合约方法名
vc.vcccsworldStatePrefix String 表示可验证凭据属性结构的合约状态数据的前缀
vc.vcvcstatusWorldStatePrefix String 表示可验证凭据状态的合约状态数据的前缀
vc.vcprotoVersion String 可验证凭据的protobuf结构版本
vc.vcstatusProtoVersion String 可验证凭据状态的protobuf结构版本
vc.txSigAlg String 构建RepChain交易所用签名算法
vc.peerEndpoint String 所连接的RepChain节点url
vc.networkId String 连接的RepChain网络标识
vc.oid String 可验证凭据管理合约的实例标识
actor Array[] 可供调用方使用的账户身份及私钥信息
actor[i].id String 可供调用方使用的账户身份及私钥信息唯一标识
actor[i].did String 可供调用方使用的账户的分布式身份did
actor[i].certName String 可供调用方使用的账户公钥证书名称
actor[i].prvKeyPath String 可供调用方使用的账户私钥文件路径

运行

将本程序编译打包,确保config.yaml在当前运行命令的目录下

并运行命令:

java -jar repchain-vc-rest-service-{version}.jar

Rest APIs

以下内容列出了本程序提供的相应Rest APIs。 此外您可以在运行成功之后访问url查看Swagger UI形式描述的详细API文档: http://localhost:8088/swagger-ui.html (默认端口为8088,您可以通过配置进行修改))

注意
  • Request body中类似"did": "did:rep:example:121000005l35120456"的属性值中的"example"在实际使用时需替换为相应已部署身份链的链标识,比如"identity-net"等。
Create CCS

创建可验证凭据属性结构CCS

url /credential-claim-schemes
method POST
request content type application/json
response content type none or application/json

request example:

  • post /credential-claim-schemes
  • body
{
    "ccsCreatorId": "actor1",
    "ccs": {
        "id": "CCS-001",
        "name": "UniversityDegreeCredential",
        "version": "1.0",
        "description": "高等学校学位证书",
        "attributes": [
            {
                "name": "serialNumber",
                "type": "String",
                "required": true,
                "description": "学位证书编号"
            },
            {
                "name": "id",
                "type": "String",
                "required": true,
                "description": "学位证书获得者did标识"
            },
            {
                "name": "name",
                "type": "String",
                "required": true,
                "description": "学位获得者姓名"
            },
            {
                "name": "degree",
                "type": "String",
                "required": true,
                "description": "学位名称"
            },
            {
                "name": "date",
                "type": "String",
                "required": true,
                "description": "学位授予日期"
            },
            {
                "name": "university",
                "type": "String",
                "required": true,
                "description": "学位授予学校(单位)"
            }
        ]
    }
}

response example:

  • status: 200
  • body: none
Get One CCS

根据唯一标识获取可验证凭据属性结构信息CCS

url /credential-claim-schemes/:id
method GET
response content type application/json

request example:

  • get /credential-claim-schemes/CCS-001

response example:

  • status: 200
  • body:
{
  "id": "CCS-001",
  "name": "UniversityDegreeCredential",
  "version": "1.0",
  "description": "高等学校学位证书",
  "created": "2021-03-17T13:13:01.075Z",
  "attributes": [
    {
      "name": "serialNumber",
      "type": "String",
      "required": true,
      "description": "学位证书编号"
    },
    {
      "name": "id",
      "type": "String",
      "required": true,
      "description": "学位证书获得者did标识"
    },
    {
      "name": "name",
      "type": "String",
      "required": true,
      "description": "学位获得者姓名"
    },
    {
      "name": "degree",
      "type": "String",
      "required": true,
      "description": "学位名称"
    },
    {
      "name": "date",
      "type": "String",
      "required": true,
      "description": "学位授予日期"
    },
    {
      "name": "university",
      "type": "String",
      "required": true,
      "description": "学位授予学校(单位)"
    }
  ]
}
Update CCS

更新可验证凭据属性结构CCS有效性

url /credential-claim-schemes/:id
method PUT
request content type application/json
response content type none or application/json

request example:

  • put /credential-claim-schemes/CCS-001
  • body:
{
    "ccsCreatorId": "actor1",
    "valid": false
}

response example:

  • status: 200
  • body: none
Create VC

创建/签发可验证凭据VC

url /verifiable-credentials
method POST
request content type application/json
response content type application/json

request example:

  • post /verifiable-credentials
  • body:
{
    "issuerId": "actor1",
    "credential": {
        "meta": {
            "id": "0x123456",
            "claimScheme": "CCS-001",
            "type": [
                "VerifiableCredential",
                "UniversityDegreeCredential"
            ],
            "validFrom": "2021-03-26T10:08:59Z",
            "validUntil": "2099-03-26T10:08:59Z"
        },
        "credentialSubject": {
            "1": {
                "name": "serialNumber",
                "value": "2021063012342176"
            },
            "2": {
                "name": "id",
                "value": "did:rep:example:12110107bi45jh675g"
            },
            "3": {
                "name": "name",
                "value": "Tom"
            },
            "4": {
                "name": "degree",
                "value": "Master"
            },
            "5": {
                "name": "date",
                "value": "2021-06-30"
            },
            "6": {
                "name": "university",
                "value": "RepChain Training University"
            }
        }
    },
    "sigAlg": "EcdsaPrime256v1Signature"
}

response example:

  • status: 200
  • body:
{
  "@context": [
    "https://www.w3.org/2018/credentials/v1"
  ],
  "id": "0x123456",
  "type": [
    "VerifiableCredential",
    "UniversityDegreeCredential"
  ],
  "claimScheme": "CCS-001",
  "issuer": "did:rep:example:121000005l35120456",
  "issued": "2021-05-07T08:33:03.613Z",
  "validFrom": "2021-03-26T10:08:59Z",
  "validUntil": "2099-03-26T10:08:59Z",
  "credentialSubject": {
    "1": {
      "serialNumber": "2021063012342176"
    },
    "2": {
      "id": "did:rep:example:12110107bi45jh675g"
    },
    "3": {
      "name": "Tom"
    },
    "4": {
      "degree": "Master"
    },
    "5": {
      "date": "2021-06-30"
    },
    "6": {
      "university": "RepChain Training University"
    }
  },
  "proof": {
    "type": "EcdsaPrime256v1Signature",
    "created": "2021-05-07T08:33:03.813Z",
    "verificationMethod": "did:rep:example:121000005l35120456#node1",
    "signature": {
      "1": "MEQCIHcYbOyh+9B7X1nm7ot+EzUr9tSEPbVcg5kYIszCuO49AiB4lPNfcFQIfeMKWQDxrN68sjEydUYibOhehJlTgHGq3g==",
      "2": "MEYCIQDNtTx+sx9sA4mKFrRCKzjGPQq/xubqD0lFZ79Edh8jAQIhAKJFael2JLA5FYM/VquKUFNRS+R9RaWAqkPiIYRiHK0x",
      "3": "MEUCIQDbtFaJmFseT5gMOuEHO9Qa54pjUnpGOTGoBNuTSv6KSAIgduDzy2c/jKR9Bi6U/3Lg0eQLt+YaJxZkoOlVnpEh2YI=",
      "4": "MEQCIDrgyMVGlxSPjCLtUqsvcuBjAuu08y3B/hQ+fKbUe1c7AiALsuF3KyPMRJiLcOEwJ0vgz2VSq6L2aTJz8BZwZQHYxA==",
      "5": "MEQCIHyfI2jCwIJoccoriSPfSRkyxaHJ+YkJceBuTMuAXlWBAiBZ2xT7MtAQZmnSqH3ZhJAyLK3EYyqOJfM2mf67MDHGbw==",
      "6": "MEYCIQDQvSMIomH+aerOtO8fsm0KPxGf4BQ7bEOu9ttG9yPHkwIhAN2s05PByt69H3r3/hL8v0FHNqoDwV6bk0qMjXWoAz5+"
    }
  }
}
Create VCS

创建可验证凭据状态VCS

url /verifiable-credentials/:id/status
method POST
request content type application/json
response content type none or application/json

request example:

  • post /verifiable-credentials/0x123456/status
  • body:
{
   "issuerId": "actor1",
   "status": "VALID"
}

response example:

  • status: 200
  • body: none
Get One VCS

根据唯一标识获取可验证凭据状态信息VCS

url /verifiable-credentials/:id/status
method POST
request content type application/json
response content type application/json

request example:

  • get /verifiable-credentials/0x123456/status

response example:

  • status: 200
  • body:
{
  "id": "0x123456",
  "status": "INVALID",
  "revokedClaimIndex": [
    "0",
    "2",
    "1"
  ],
  "creator": "did:rep:example:121000005l35120456"
}
Update VCS

更新可验证凭据状态VCS

url /verifiable-credentials/:id/status
method PUT
request content type application/json
response content type none or application/json

request example:

  • put /verifiable-credentials/0x123456/status
  • body:
{
   "issuerId": "actor1",
   "id": "0x123456",
   "status": "INVALID"
}

response example:

  • status: 200
  • body: none
Verify VC Signature

验证可验证凭据的签名

url /verifiable-credentials/:id/verifying-signature
method POST
request content type application/json
response content type application/json

request example:

  • post /verifiable-credentials/0x123456/verifying-signature
  • body:
{
  "verifiableCredential": {
    "@context": [
      "https://www.w3.org/2018/credentials/v1"
    ],
    "id": "0x123456",
    "type": [
      "VerifiableCredential",
      "UniversityDegreeCredential"
    ],
    "claimScheme": "CCS-001",
    "issuer": "did:rep:example:121000005l35120456",
    "issued": "2021-04-25T02:54:04.732Z",
    "validFrom": "2021-03-26T10:08:59Z",
    "validUntil": "2099-03-26T10:08:59Z",
    "credentialSubject": {
      "3": {
        "name": "Tom"
      },
      "4": {
        "degree": "Master"
      },
      "6": {
        "university": "RepChain Training University"
      }
    },
    "proof": {
      "type": "EcdsaPrime256v1Signature",
      "created": "2021-04-25T02:54:04.853Z",
      "verificationMethod": "did:rep:example:121000005l35120456#node1",
      "signature": {
        "3": "MEYCIQDZM5T/YZUfEx4y1ToElx/L8JU8jRu3nNdUtovIUBEj6wIhAKHKTMSDe9QM1IRHKPOvolQTm0Xr1i3tEHAXT1J+bGQh",
        "4": "MEUCIQDcWfS/0kOq1sYdsTovmAQAr5GhUNX846WRPBdPjlOx9gIgb2vKZKpsrzorwY8jEGURHG7VAvJig1Re3C/j+m/fTZg=",
        "6": "MEUCIGi5zBTzHZbxQqtX6AviHWsZpuyfZYgZmGGQPnXr0Tk9AiEApK6owZAFVSCdZjc9LN+svuAnqK1hfmr7eTC/LBWHWxQ="
      }
    }
  }
}

response example:

  • status: 200
  • body:
{ "result": true }
Selectively Disclose VC

选择性披露可验证凭据VC

url /verifiable-credentials/:id/selective-disclosing
method POST
request content type application/json
response content type application/json

request example:

  • post /verifiable-credentials/0x123456/selective-disclosing
  • body:
{
    "verifiableCredential": {
        "@context": [
            "https://www.w3.org/2018/credentials/v1"
        ],
        "id": "0x123456",
        "type": [
            "VerifiableCredential",
            "UniversityDegreeCredential"
        ],
        "claimScheme": "CCS-001",
        "issuer": "did:rep:example:121000005l35120456",
        "issued": "2021-04-25T02:54:04.732Z",
        "validFrom": "2021-03-26T10:08:59Z",
        "validUntil": "2099-03-26T10:08:59Z",
        "credentialSubject": {
            "1": {
                "serialNumber": "2021063012342176"
            },
            "2": {
                "id": "did:rep:example:12110107bi45jh675g"
            },
            "3": {
                "name": "Tom"
            },
            "4": {
                "degree": "Master"
            },
            "5": {
                "date": "2021-06-30"
            },
            "6": {
                "university": "RepChain Training University"
            }
        },
        "proof": {
            "type": "EcdsaPrime256v1Signature",
            "created": "2021-04-25T02:54:04.853Z",
            "verificationMethod": "did:rep:example:121000005l35120456#node1",
            "signature": {
                "1": "MEUCIQCLhS/4RnQ47591VxCzvXyVWOUYs1JgouNCb41reW1YWgIgddtbHLTx+vJxQCFq6wcv24zl0rXQdlp91aq0/Y8u0wY=",
                "2": "MEUCIQCikhWKoSSO4GHonXV2TYPyOvdR+loFSYu2uW1nsVOL7wIgS7UIeO2YMC6Jq57H3dOUKJI5/a0vBPpU2v9sDvaBqgA=",
                "3": "MEYCIQDZM5T/YZUfEx4y1ToElx/L8JU8jRu3nNdUtovIUBEj6wIhAKHKTMSDe9QM1IRHKPOvolQTm0Xr1i3tEHAXT1J+bGQh",
                "4": "MEUCIQDcWfS/0kOq1sYdsTovmAQAr5GhUNX846WRPBdPjlOx9gIgb2vKZKpsrzorwY8jEGURHG7VAvJig1Re3C/j+m/fTZg=",
                "5": "MEQCIB4K6diQM76T+Yg0Li9CHN5K53NsDsLFP3PkIYUp/TQCAiAOj9rn0q/Qg+6G4WCHbnfPte3vNNcXK2fq9OESdQekqA==",
                "6": "MEUCIGi5zBTzHZbxQqtX6AviHWsZpuyfZYgZmGGQPnXr0Tk9AiEApK6owZAFVSCdZjc9LN+svuAnqK1hfmr7eTC/LBWHWxQ="
            }
        }
    },
    "selectiveNames": ["name", "degree", "university"]
}

response example:

  • status: 200
  • body:
{
  "@context": [
    "https://www.w3.org/2018/credentials/v1"
  ],
  "id": "0x123456",
  "type": [
    "VerifiableCredential",
    "UniversityDegreeCredential"
  ],
  "claimScheme": "CCS-001",
  "issuer": "did:rep:example:121000005l35120456",
  "issued": "2021-04-25T02:54:04.732Z",
  "validFrom": "2021-03-26T10:08:59Z",
  "validUntil": "2099-03-26T10:08:59Z",
  "credentialSubject": {
    "3": {
      "name": "Tom"
    },
    "4": {
      "degree": "Master"
    },
    "6": {
      "university": "RepChain Training University"
    }
  },
  "proof": {
    "type": "EcdsaPrime256v1Signature",
    "created": "2021-04-25T02:54:04.853Z",
    "verificationMethod": "did:rep:example:121000005l35120456#node1",
    "signature": {
      "3": "MEYCIQDZM5T/YZUfEx4y1ToElx/L8JU8jRu3nNdUtovIUBEj6wIhAKHKTMSDe9QM1IRHKPOvolQTm0Xr1i3tEHAXT1J+bGQh",
      "4": "MEUCIQDcWfS/0kOq1sYdsTovmAQAr5GhUNX846WRPBdPjlOx9gIgb2vKZKpsrzorwY8jEGURHG7VAvJig1Re3C/j+m/fTZg=",
      "6": "MEUCIGi5zBTzHZbxQqtX6AviHWsZpuyfZYgZmGGQPnXr0Tk9AiEApK6owZAFVSCdZjc9LN+svuAnqK1hfmr7eTC/LBWHWxQ="
    }
  }
}
Revoke VC Claims

撤销可验证凭据属性

url /verifiable-credentials/:id/revoking-claims
method PUT
request content type application/json
response content type none or application/json

request example:

  • put /verifiable-credentials/0x123456/revoking-claims
  • body:
{
   "issuerId": "actor1",
   "revokedClaimIndex": ["0", "2"]
}

response example:

  • status: 200
  • body: none
Create VP

创建可验证凭据出示信息VP

url /verifiable-presentations
method POST
request content type application/json
response content type application/json

request example:

  • post /verifiable-presentations
  • body:
{
    "holderId": "actor2",
    "metadata": {
        "type": ["UniversityDegreePresentation"],
        "id": "0x987654"
    },
    "vc": {
        "@context": [
            "https://www.w3.org/2018/credentials/v1"
        ],
        "id": "0x123456",
        "type": [
            "VerifiableCredential",
            "UniversityDegreeCredential"
        ],
        "claimScheme": "CCS-001",
        "issuer": "did:rep:example:121000005l35120456",
        "issued": "2021-04-25T02:54:04.732Z",
        "validFrom": "2021-03-26T10:08:59Z",
        "validUntil": "2099-03-26T10:08:59Z",
        "credentialSubject": {
            "3": {
                "name": "Tom"
            },
            "4": {
                "degree": "Master"
            },
            "6": {
                "university": "RepChain Training University"
            }
        },
        "proof": {
            "type": "EcdsaPrime256v1Signature",
            "created": "2021-04-25T02:54:04.853Z",
            "verificationMethod": "did:rep:example:121000005l35120456#node1",
            "signature": {
                "3": "MEYCIQDZM5T/YZUfEx4y1ToElx/L8JU8jRu3nNdUtovIUBEj6wIhAKHKTMSDe9QM1IRHKPOvolQTm0Xr1i3tEHAXT1J+bGQh",
                "4": "MEUCIQDcWfS/0kOq1sYdsTovmAQAr5GhUNX846WRPBdPjlOx9gIgb2vKZKpsrzorwY8jEGURHG7VAvJig1Re3C/j+m/fTZg=",
                "6": "MEUCIGi5zBTzHZbxQqtX6AviHWsZpuyfZYgZmGGQPnXr0Tk9AiEApK6owZAFVSCdZjc9LN+svuAnqK1hfmr7eTC/LBWHWxQ="
            }
        }
    },
    "sigAlg": "EcdsaPrime256v1Signature",
    "challenge": "challenge-random-jsdio837jkds"
}

response example:

  • status: 200
  • body:
{
  "@context": [
    "https://www.w3.org/2018/credentials/v1"
  ],
  "id": "0x987654",
  "type": [
    "VerifiablePresentation",
    "UniversityDegreePresentation"
  ],
  "holder": "did:rep:example:12110107bi45jh675g",
  "verifiableCredential": {
    "@context": [
      "https://www.w3.org/2018/credentials/v1"
    ],
    "id": "0x123456",
    "type": [
      "VerifiableCredential",
      "UniversityDegreeCredential"
    ],
    "claimScheme": "CCS-001",
    "issuer": "did:rep:example:121000005l35120456",
    "issued": "2021-04-25T02:54:04.732Z",
    "validFrom": "2021-03-26T10:08:59Z",
    "validUntil": "2099-03-26T10:08:59Z",
    "credentialSubject": {
      "3": {
        "name": "Tom"
      },
      "4": {
        "degree": "Master"
      },
      "6": {
        "university": "RepChain Training University"
      }
    },
    "proof": {
      "type": "EcdsaPrime256v1Signature",
      "created": "2021-04-25T02:54:04.853Z",
      "verificationMethod": "did:rep:example:121000005l35120456#node1",
      "signature": {
        "3": "MEYCIQDZM5T/YZUfEx4y1ToElx/L8JU8jRu3nNdUtovIUBEj6wIhAKHKTMSDe9QM1IRHKPOvolQTm0Xr1i3tEHAXT1J+bGQh",
        "4": "MEUCIQDcWfS/0kOq1sYdsTovmAQAr5GhUNX846WRPBdPjlOx9gIgb2vKZKpsrzorwY8jEGURHG7VAvJig1Re3C/j+m/fTZg=",
        "6": "MEUCIGi5zBTzHZbxQqtX6AviHWsZpuyfZYgZmGGQPnXr0Tk9AiEApK6owZAFVSCdZjc9LN+svuAnqK1hfmr7eTC/LBWHWxQ="
      }
    }
  },
  "proof": {
    "type": "EcdsaPrime256v1Signature",
    "created": "2021-05-07T09:15:18.845Z",
    "verificationMethod": "did:rep:example:12110107bi45jh675g#node2",
    "challenge": "challenge-random-jsdio837jkds",
    "signature": "MEQCID0di91TRN5qW0s16KgdzXFz7a/OPEK0l0dK8wfJtMWyAiBnfI7uwedvLfAfyJ2YOdtQHT79F2wFiemf31HeeO63Dw=="
  }
}
Verify VP

验证可验证凭据出示信息VP,将同时对VP签名、VP中包含VC的签名以及VC的有效期,状态进行验证

url /verifiable-presentations/:id/verifying
method POST
request content type application/json
response content type application/json

request example:

  • post /verifiable-presentations/0x987654/verifying
  • body:
{
    "vp": {
        "@context": [
            "https://www.w3.org/2018/credentials/v1"
        ],
        "id": "0x987654",
        "type": [
            "VerifiablePresentation",
            "UniversityDegreePresentation"
        ],
        "holder": "did:rep:example:12110107bi45jh675g",
        "verifiableCredential": {
            "@context": [
                "https://www.w3.org/2018/credentials/v1"
            ],
            "id": "0x123456",
            "type": [
                "VerifiableCredential",
                "UniversityDegreeCredential"
            ],
            "claimScheme": "CCS-001",
            "issuer": "did:rep:example:121000005l35120456",
            "issued": "2021-04-25T10:33:48.561Z",
            "validFrom": "2021-03-26T10:08:59Z",
            "validUntil": "2099-03-26T10:08:59Z",
            "credentialSubject": {
                "6": {
                    "university": "RepChain Training University"
                }
            },
            "proof": {
                "type": "EcdsaPrime256v1Signature",
                "created": "2021-04-25T10:33:48.561Z",
                "verificationMethod": "did:rep:example:121000005l35120456#node1",
                "signature": {
                    "6": "MEYCIQDyMksOsTiXRHvAHBA+KDiRf3nQwARwDVaYOcH0pZFquAIhAOsxbXB3mUaQbnQmoJ6jUq6UNpubmQVtRiWBf177QIf7"
                }
            }
        },
        "proof": {
            "type": "EcdsaPrime256v1Signature",
            "created": "2021-04-25T10:35:53.840Z",
            "verificationMethod": "did:rep:example:12110107bi45jh675g#node2",
            "challenge": "challenge-random-jsdio837jkds",
            "signature": "MEYCIQDnVcc6464yE7dKMtc1s2zPkWY3i3n72UkJNGuwzgftDQIhAJrj5UWfwHux93MsS5+yU/PdBkNGgQ0eCLUMPWS7erg2"
        }
    },
    "targetChallenge": "challenge-random-jsdio837jkds",
    "targetStatus": [
        "VALID"
    ]
}

response example:

  • status: 200
  • body:
{ "result": true }
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

简介

暂无描述 展开 收起
Java
Apache-2.0
取消

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/BTAJL/repchain-vc-rest-service.git
git@gitee.com:BTAJL/repchain-vc-rest-service.git
BTAJL
repchain-vc-rest-service
repchain-vc-rest-service
master

搜索帮助