Adhaar Card API



我想获得任何Adhaar卡号的持有人姓名。我通过post方法调用URLhttp://auth.uidai.gov.in/1.6/public/8/7/MKzX8dnY5qyuO4z8neQPDqrSCMAU5pCS32obnzl83xwtFdi45gwK6QA

和header Content-Type为application/xml请求正文为XML类型,即

`<Auth uid="999999990019" tid="public" ac="public" sa="public" ver="1.6" txn="AuthDemoClient:public:20160916100818332" lk="MEWs4XwP0AzUVGSlKwZkMqeHJqyOvzIfz1rxEFm1uu0cRhoxjeWcIqY">
 <Uses pi="n" pa="n" pfa="" bio="n" bt="" pin="n" otp="n"/>
 <Tkn type="" value=""/>
 <Meta udc="" fdc="" idc="" pip="" lot="G|P" lov=""/>
 <Skey ci="" ki="">encrypted and encoded session key</Skey>
 <Data type="X|P">encrypted PID block</Data>
 <Hmac>SHA-256 Hash of Pid block, encrypted and then encoded</Hmac>
 <Signature>Digital signature of AUA</Signature>
</Auth> `

响应是

`<?xml version="1.0" encoding="UTF-8"?>
<AuthRes code="NA" err="570" info="02{40230841e14ba593e64eb0799c7c01c712da52f941f43c68833c599847f6e44a,0000000000000000000000000000000000000000000000000000000000000000,0100000000000000,NA,NA,NA,NA,NA,1.6,20ef0f0c8d0eea98772412cea9b3b92612e3e53cb5e59152b5703165f56e8a53,efa1f375d76194fa51a3556a97e641e61685f914d446979da50a551a4333ffd7,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,efa1f375d76194fa51a3556a97e641e61685f914d446979da50a551a4333ffd7}" ret="n" ts="2016-09-16T22:22:38.323+05:30" txn="AuthDemoClient:public:20160916100818332">
    <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
        <SignedInfo>
            <CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
            <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
            <Reference URI="">
                <Transforms>
                    <Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
                </Transforms>
                <DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
                <DigestValue>CY8rsfrpu8RWoK1BIV7xvJCxER3WwZG6OrQLoifpEjA=</DigestValue>
            </Reference>
        </SignedInfo>
        <SignatureValue>mXOQ/vAoXCq3haU1aufBt6xlY6piVekauhqvCeKwaJFQtrQ4kd4RaKIXzb0MqHRWF/Va1vXrsYZQ
geVxWmy1DinrJlK/230PhQoB951xoGxLLQyvztYwjRMa6PaPgR+DmwEA4w6u9uU9wNeO55gPKnBQ
nJq7F92jFaZbUIypA8MNYvg3Piygu/OMxUxqxc7OtjN1IfQimbz638LB1trzaShBYvMFAy838058
16jwplXHCDj74M7qjNvhVLF4trgT90v+a92uYcL3Mz6dGLWlgFInQa4Edy6kySIT4JQ180oPepb6
3FmewCwWHG2kbo8H2zOtMcazVEzjhaMkOb9pfw==</SignatureValue>
    </Signature>
</AuthRes> `

在google中我得到err="570"表示

数字签名中的密钥信息无效(这意味着用于签名身份验证请求的证书无效-它要么过期,要么不属于AUA,要么不是由知名的证书颁发机构创建的)

希望您在签名标签下发送正确的签名信息。这将用于完整性检查,否则将抛出错误。

相关内容

  • 没有找到相关文章

最新更新