Giter Club home page Giter Club logo

aadhaarapi.net's Introduction

Aadhaar API for .NET

Aadhaar API for .NET is a client library that provides an easy way to interact with the UIDAI Aadhaar services.

Getting Started & API Reference

For details on how to use it, please visit the PROJECT HOME.

Questions & Feedback

Join the chat at https://gitter.im/souvikdc9/aadhaarapi.net

Other Platforms

Copyright & License

Copyright © 2015 Souvik Dey Chowdhury

Licensed under GNU Lesser General Public License v3 or later

aadhaarapi.net's People

Contributors

gitter-badger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

aadhaarapi.net's Issues

API and HTTP errors with version 1.6

@souvikdc9 am i doing wrong or missing anything? can u tell

1

outgoing request

<Auth tid="public" ac="public" sa="public" txn="20180113102913355" lk="MEaMX8fkRa6PqsqK6wGMrEXcXFl_oXHA-YuknI2uf0gKgZ80HaZgG3A" uid="999999990019" ver="1.6" rc="Y" xmlns="http://www.uidai.gov.in/authentication/uid-auth-request/1.0"> <Uses pi="y" pa="y" pfa="n" bio="n" otp="n" pin="n" xmlns="" /> <Meta udc="ABCDE.20150101.00001" fdc="NA" idc="NA" pip="NA" lot="G" lov="21,78,0" xmlns="" /> <Skey ci="20200916" xmlns="">k7RZl0GG/Mz3tTs2ZX85xMAYdKnWYypyl7XJKWFmEZtCnnu3nyXOiOqO3qLxakRp2YIW8eBD0zrY2vxiybRMXt+/XTSO8I8x3A28Uz6xF6EyoaWqssugM6HB7dDAJzJF6abRg8EzhUMfiRZci4ynalscoUTWSH96jZaGmXReozW79K08Z9tj671XzAP/CFGPP066pA5oWsDHbIPtPPGatMpYyqko1L5vyoVugGwOmw1tZ/EZx8uSFBIgXMCIQKOxb/xzUeY3HGdzEFKHY5ZLjx4eHyOPRGyXo9dRCyQo0io7f2NLtGaMLEDNGXZvUliBZs/jqCkDPuza4Sp14Ot/gw==</Skey> <Data type="X" xmlns="">p/pMZqn9SsJVyKS+im8FqlsxmtCBkxVu9mMes71D8K+E9geETCE9kJz6LznbhjZN+XupfTQktbxMIfvCbHLLIahI1Y0hq8KfBkFZBdjFgPp8slCVe4YzhOuxUMR4OaUwIo19YqsC6bjgBoyybT1S+9ftkjuzwT73F5T51r/QMYN+RdjOg5TWvlH8o18uFyhxjXlTJcuEwAmy1z/vuvcXX6uH2DTPBJuAacsfLjgAy2XzxJC/ntAaTJz3/3KY271t1eGAyDv7+Wvc4UXgf04FmFSKcYRaYr69AK9Gdzypwx9ud21+k0CPz8Vw0i2Euju8LDOwm55gYPlT5cErcY4v11Dr28rbYqpNmr6Z59dX+ohWENdSfR3dmgnFIspiZcAcE0We/FL2AYY+VG1Ngb+0H03ctuaR/REZji0haNkh9D6HIYX74u+E1C0BeqloGTfw</Data> <Hmac xmlns="">HAAuZUAblCsswOSbj+MBM1YsWtiMB3jWEA1ETTQfXrLCres92eX4JCBrSA+HStnH</Hmac> <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/2001/04/xmldsig-more#rsa-sha256" /> <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>ifafMel8cgQuxRYdOQytRfAKyPC2FXYvCdF6UbDCIrc=</DigestValue> </Reference> </SignedInfo> <SignatureValue>Yaje8U4JoY+CTfZJDq1YDdEG5x8iZxajN6OauK4tR0dbXitzakp+VRD0JSYL5niBinlYJx8YOR/YO+A/Kg7KxRZ11vpaVBLKcd6mojNDApittDFLhXDy660knMBQQWkN56m4o6++kZ7xrcgmSLo3MTttpNANjMBhprhIZZPnU3gXou26m3VY6qz3HgI2dncbgZLba3x348sfN28b4nE15g2k4/ZhVTstODzaoGGdCcrAq5zIMrJhf3fXhIgDpxbJJYtzSQWB5g6Kmlbl/D3Ay7YPu2CmdoP1ptYT/G/Xek+Iw4YM5hkIOjHkjw2goaPYlQOVpWSE4SMlr1IzyATuCg==</SignatureValue> <KeyInfo> <X509Data> <X509SubjectName>CN=Public AUA for Staging Services, OU=Staging Services, O=Public AUA, L=Bangalore, S=KA, C=IN</X509SubjectName> <X509Certificate>MIIDuDCCAqCgAwIBAgIGA7J+eqryMA0GCSqGSIb3DQEBBQUAMIGNMQswCQYDVQQGEwJJTjELMAkGA1UECBMCS0ExEjAQBgNVBAcTCUJhbmdhbG9yZTETMBEGA1UEChMKUHVibGljIEFVQTEZMBcGA1UECxMQU3RhZ2luZyBTZXJ2aWNlczEtMCsGA1UEAxMkUm9vdCBQdWJsaWMgQVVBIGZvciBTdGFnaW5nIFNlcnZpY2VzMB4XDTE2MDUyNDE0NDAzMVoXDTIwMDUyNDE0NDAzMVowgYgxCzAJBgNVBAYTAklOMQswCQYDVQQIEwJLQTESMBAGA1UEBxMJQmFuZ2Fsb3JlMRMwEQYDVQQKEwpQdWJsaWMgQVVBMRkwFwYDVQQLExBTdGFnaW5nIFNlcnZpY2VzMSgwJgYDVQQDEx9QdWJsaWMgQVVBIGZvciBTdGFnaW5nIFNlcnZpY2VzMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAo4XxOsjK58Ud+tQd06Mk8Rd0qoyjA/3u+y0YVYEF6RgT8Ge1uVdTkIcVYaHyXuuHUPLLqGW1hPfVtn81UVIMGyrw5+t1c30wpGv3UJ6GCFu0sPGgG5NwkVbIUt2xgT/Or/kGzHjUJJy4Y6URSkZiDLDQQWRXvui5ZwwsYRJ8LhT0pSUwan1raG5Vl01GmlWVqsrCmnObuoYkN85iwG4/ERGshkgFCPak8B/jH3GPZSi1+FJLmCqMI1xxmTvf0kZb7ejm2IZFTo6ecYWJ1vylkzUI553RxVbnHCNZvFe3AyaKMyFlknFR0Fkl5+9Lpxz+VOajbCjicg7jIYCw76/xgQIDAQABoyEwHzAdBgNVHQ4EFgQUJHLir1/Tel8v/6OuIXpLS0JH8jIwDQYJKoZIhvcNAQEFBQADggEBAFE15qMGIlp8+M306FbhDEvo1vzxN2Pfvg/f92NXH59d2XZ/wuHxugL8qfcM5xkqsDeIRVxRdISpwiIWlqTitn6lenF85bvPQ09T/b09dVz/LxwU2Cm6+6H5/HZSoLtCKBOuRzAKQdxczpyfaqv9caFC+LegPQIm2HCwOM0A4KzhYcFhumGeyCbyVZsSQcJE7bYc/IHkR2erup7h5BACOZ/a+hHLPQok/uGvtEsR3roydNcNlR8Ja6Wc4eUf7kisTuZTxwRJI9DPVimbs0VAqhnsnVWAK3X4+6sFUq5WfHS4wTRhrR93JvEV5LlQ6UCXYOQMvTii8l07qxkDiysVsLQ=</X509Certificate> </X509Data> </KeyInfo> </Signature> </Auth>

Sample Configuration not working

Hello,

in Uidai.Aadhaar.Sample, Microsoft.Extensions.Configuration.ConfigurationBuilder().Bind(options) function is not working or found.
Actually Bind(options) is not found in Microsoft.Extensions.Configuration.ConfigurationBuilder class at all,
Please let me know ASAP

error 937

I am getting 937 error with this code, any clue?

Error 501 while using production certificate

Hi Team

I am using AUA.p12 downloaded from github and uidai_auth_prod.cer from Aadhaar site. i have implemented Nuget Aadhaar Package. while executing with uidai_auth_stag.cer it is working fine. But while using procuction certificate it is giving Error "501" CI value can not be hardcoded. Please help i am stucked for long no help anywhere. I will be thankful if you could reply to my mail.
Thanking you

Code is below:

            var signerAndVerifier = new XmlSignature
            {
                Signer = new X509Certificate2(configuration.AuaSignatureKeyPath, "public", X509KeyStorageFlags.Exportable),
                Verifier = new X509Certificate2(configuration.UidaiSignatureKeyPath)
            };


            using (var sessionKey = new SessionKey(Configuration.UidaiEncryptionKeyPath, false))
                await deviceContext.EncryptAsync(personalInfo, sessionKey);

var apiClient = new AuthClient
{
AgencyInfo = Configuration.AgencyInfo,
Request = new AuthRequest(deviceContext) { Signer = Signer },
Response = new AuthResponse { Verifier = Verifier }

        };

await apiClient.GetResponseAsync();

[email protected]

project not opening

hello sir,
kindly help me with this problem...
project is not opening
error : The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format.

Error while running OTP Request?

Additional information: '=' is an unexpected token. The expected token is ';'. Line 1197, position 72.

at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.HandleEntityReference(Boolean isInAttributeValue, EntityExpandType expandType, Int32& charRefEndPos)
at System.Xml.XmlTextReaderImpl.ParseText(Int32& startPos, Int32& endPos, Int32& outOrChars)
at System.Xml.XmlTextReaderImpl.FinishPartialValue()
at System.Xml.XmlTextReaderImpl.get_Value()
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r)
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r, LoadOptions o)
at System.Xml.Linq.XElement.ReadElementFrom(XmlReader r, LoadOptions o)
at System.Xml.Linq.XElement.Load(XmlReader reader, LoadOptions options)
at System.Xml.Linq.XElement.Load(Stream stream, LoadOptions options)
at Uidai.Aadhaar.Agency.ApiClient2.<GetResponseXmlAsync>d__25.MoveNext() in C:\Users\Shubh Rocks Goel\Downloads\Compressed\aadhaarapi.net-master\aadhaarapi.net-master\Source\src\Uidai.Aadhaar\Agency\ApiClient.cs:line 138 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult()
at Uidai.Aadhaar.Agency.ApiClient2.<GetResponseAsync>d__22.MoveNext() in C:\Users\Shubh Rocks Goel\Downloads\Compressed\aadhaarapi.net-master\aadhaarapi.net-master\Source\src\Uidai.Aadhaar\Agency\ApiClient.cs:line 94 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at Uidai.Aadhaar.Agency.ApiClient2.d__21.MoveNext() in C:\Users\Shubh Rocks Goel\Downloads\Compressed\aadhaarapi.net-master\aadhaarapi.net-master\Source\src\Uidai.Aadhaar\Agency\ApiClient.cs:line 78
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Uidai.Aadhaar.Sample.Otp.d__8.MoveNext() in C:\Users\Shubh Rocks Goel\Downloads\Compressed\aadhaarapi.net-master\aadhaarapi.net-master\Source\src\Uidai.Aadhaar.Sample\Otp.cs:line 53
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Uidai.Aadhaar.Sample.Program.Main(String[] args) in C:\Users\Shubh Rocks Goel\Downloads\Compressed\aadhaarapi.net-master\aadhaarapi.net-master\Source\src\Uidai.Aadhaar.Sample\Program.cs:line 30

Update this project api to 2.5

Hi Souvik,

I have tried your wonderful project but it is developed for API spec 1.6 and since then there has some changes from UIDAI. Also the 1.6 staging API are now shutdown.

I tried modifying the source but I ended up getting 502 error ie Invalid PID encryption.

Could you please help with your expertise and upgrade the project to the latest API specification.

Error Code 998 while authenticating Aadhaar by OTP

I downloaded project and started running by setting "Uidai.Aadhaar.Sample" as startup project.
All the data inside project is tested data by Uidai. I am trying to authenticate By OTP.

Kyc.KnowYourCustomerAsync().GetAwaiter().GetResult(); in program.cs file

URL: http://developer.uidai.gov.in/otp/1.6/public/9/9/MG41KIrkk5moCkcO8w-2fc01-P7I5S-6X2-X7luVcDgZyOa2LXs3ELI

Body:

9Mv/mf6sByXfv3ZWxdnrDbenH+U= R5q3YHW8kUYCimSJPQMCZgNB+nDTINJtZ6Vog9sdmgBj8KoLzf3a8ebcWpeZrQAZ7rje3KRblDksxw+aXEFIFQ2jFq8IjzWgx58/BrRnZgh2kfoiv1Ve8hYYw2S+rQW5mKvbVs6aG18hSnbycYJE8Zgg5sbPak1faa8dRZBJhgqNfxvuYGEzPlTuYpA3v05jZeICvRX/eYg93iDIz0s1NJLiKiq/rI6mev8BY/eA7Pu6En7VUVnVcj47YStMiByZqUiuDQ6YrXZGd97kAC85H7gVRV7ZTkyDwulO/7ml6cEp9EpAReY6cvsw6ZzYMng1e1bTPj2CIboWKPHDlKqNSw== CN=Public AUA for Staging Services, OU=Staging Services, O=Public AUA, L=Bangalore, S=KA, C=IN MIIDuDCCAqCgAwIBAgIGA7J+eqryMA0GCSqGSIb3DQEBBQUAMIGNMQswCQYDVQQGEwJJTjELMAkGA1UECBMCS0ExEjAQBgNVBAcTCUJhbmdhbG9yZTETMBEGA1UEChMKUHVibGljIEFVQTEZMBcGA1UECxMQU3RhZ2luZyBTZXJ2aWNlczEtMCsGA1UEAxMkUm9vdCBQdWJsaWMgQVVBIGZvciBTdGFnaW5nIFNlcnZpY2VzMB4XDTE2MDUyNDE0NDAzMVoXDTIwMDUyNDE0NDAzMVowgYgxCzAJBgNVBAYTAklOMQswCQYDVQQIEwJLQTESMBAGA1UEBxMJQmFuZ2Fsb3JlMRMwEQYDVQQKEwpQdWJsaWMgQVVBMRkwFwYDVQQLExBTdGFnaW5nIFNlcnZpY2VzMSgwJgYDVQQDEx9QdWJsaWMgQVVBIGZvciBTdGFnaW5nIFNlcnZpY2VzMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAo4XxOsjK58Ud+tQd06Mk8Rd0qoyjA/3u+y0YVYEF6RgT8Ge1uVdTkIcVYaHyXuuHUPLLqGW1hPfVtn81UVIMGyrw5+t1c30wpGv3UJ6GCFu0sPGgG5NwkVbIUt2xgT/Or/kGzHjUJJy4Y6URSkZiDLDQQWRXvui5ZwwsYRJ8LhT0pSUwan1raG5Vl01GmlWVqsrCmnObuoYkN85iwG4/ERGshkgFCPak8B/jH3GPZSi1+FJLmCqMI1xxmTvf0kZb7ejm2IZFTo6ecYWJ1vylkzUI553RxVbnHCNZvFe3AyaKMyFlknFR0Fkl5+9Lpxz+VOajbCjicg7jIYCw76/xgQIDAQABoyEwHzAdBgNVHQ4EFgQUJHLir1/Tel8v/6OuIXpLS0JH8jIwDQYJKoZIhvcNAQEFBQADggEBAFE15qMGIlp8+M306FbhDEvo1vzxN2Pfvg/f92NXH59d2XZ/wuHxugL8qfcM5xkqsDeIRVxRdISpwiIWlqTitn6lenF85bvPQ09T/b09dVz/LxwU2Cm6+6H5/HZSoLtCKBOuRzAKQdxczpyfaqv9caFC+LegPQIm2HCwOM0A4KzhYcFhumGeyCbyVZsSQcJE7bYc/IHkR2erup7h5BACOZ/a+hHLPQok/uGvtEsR3roydNcNlR8Ja6Wc4eUf7kisTuZTxwRJI9DPVimbs0VAqhnsnVWAK3X4+6sFUq5WfHS4wTRhrR93JvEV5LlQ6UCXYOQMvTii8l07qxkDiysVsLQ=

Response:

 <OtpRes txn="20180131032427098" err="998" actn="A202" 

code="eb4619dba1734185b75763194f61128a" ts="2018-01-31T15:30:34.384+05:30" ret="n"
info="01{c039ac2f8cba7681dfa2470c9552173f11998bcf4cefc319419f8cf071e431ca,A,0001-01-
01T00:00:00,1.6,20ef0f0c8d0eea98772412cea9b3b92612e3e53cb5e59152b5703165f56e8a53,efa1f375d7
6194fa51a3556a97e641e61685f914d446979da50a551a4333ffd7,efa1f375d76194fa51a3556a97e641e616
85f914d446979da50a551a4333ffd7,NA,NA}" />

What is exact issue am facing?

503 Service Unavailable

I downloaded project right now and set "Uidai.Aadhaar.Sample" as start up project and debugged. I am facing below issue. Do i need to modify anything after i downloading. I did not modified any personal information which Uidai test data.

Auth.AuthenticateAsync().GetAwaiter().GetResult(); in program.cs which internally navigates to Auth cs file.

In Auth.cs file :
// Perform Authentication
var apiClient = new AuthClient
{
AgencyInfo = Options.AgencyInfo,
Request = new AuthRequest(deviceContext) { Signer = Signer },
Response = new AuthResponse { Verifier = Verifier }
};
await apiClient.GetResponseAsync(); -- Exception causing at this step.

Pls. help me to solve this. Or am i need to change anything after downloading.
503service

Error when running sample XmlSignature could not be found

Program.cs(22,41): error CS0246: The type or namespace name 'XmlSignature' could not be found (are you missing a using directive or an assembly reference?) [/Users/itsbalamurali/Workspace/aadhaarapi.net/Source/Uidai.Aadhaar.Sample/Uidai.Aadhaar.Sample.csproj]
Program.cs(31,33): error CS0246: The type or namespace name 'KycDecryptor' could not be found (are you missing a using directive or an assembly reference?) [/Users/itsbalamurali/Workspace/aadhaarapi.net/Source/Uidai.Aadhaar.Sample/Uidai.Aadhaar.Sample.csproj]

The build failed. Please fix the build errors and run again.

Using .netcore2.0 as target.

Getting "Invalid Algorithm Specified" error

Dear Sir,

I have encountered the error as below:
System.Security.Cryptography.CryptographicException: 'Invalid algorithm specified"

Please let me know what's the issue regarding abt and also the solution for the same.

thanks and regards,

Provide any demo or any video

Hi Souvik Dey Chowdhury,

Please provide any demo instance or video, how to retrieve data from uidai Portal.
if you know. kindly let to me.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.