Authentication API
This document explains how to use Authentication APIs. Authentication APIs use HTTP POST protocol and send and receive messages in JSON format.
Endpoint
Real Server : https://auth.finenex.net/v2
Test Server : https://test-auth.finenex.net/v2
API References
Authenticate
Log in using your ID and password.
userType
is ignored. Currently it is not used.You can authenticate through
id
andpassword
.If there is a
token
value, the token validity period can be extended.If successful, you get a new JWT
token
. It also receives basic user information, such as username
,userId
,telNo
, andemail
.
Example
curl -X 'POST' \
'{endpoint}/auth/auth-user' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"id": "test",
"password": "1111"
}'
{
"token": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0Iiwicm9sZSI6IlJPTEVfVVNFUiIsImV4cCI6MTY2ODc3ODEwMCwidXNlciI6IjQ3MDA2MDM2NDRCNzAwMDQiLCJpYXQiOjE2NjYxODYxMDB9.QQ_J1KMG58wG5D4THOCoXHqQVNd2SQ8jXqwpUnqmavY",
"userId": "test",
"name": "Test User",
"telNo": "12345678",
"email": ""
}
Log in using your VP (Verifiable Presentation).
Put the VP body in
vp
.In case of the application's own login,
requestId
is not needed.requestId
is required for web site login. When the web site shows the QR code through the browser, the user application reads this value, puts it in therequetId
, and calls this API to log in to the web site.If successful, you get a new JWT
token
. It also receives basic user information, such as username
,userId
,telNo
, andemail
.
Example
curl -X 'POST' \
'{endpoint}/auth/auth-user-with-vp' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"vp": {
"verifiableCredential" : [ {
"credentialSubject" : {
"name" : "asd",
"phone" : "432-4324",
"sub" : "01022223333",
"id" : "did:ethr:0xb80a41cd53c3a42faa5a5f58e61909e50df811e0"
},
"issuer" : {
"id" : "did:ethr:0xd284cdc964af8a01d82d0caa7deeba82785b54f4"
},
"type" : [ "VerifiableCredential", "Profile" ],
"@context" : [ "https://www.w3.org/2018/credentials/v1" ],
"issuanceDate" : "2022-10-18T09:14:22.000Z",
"proof" : {
"type" : "JwtProof2020",
"jwt" : "eyJhbGciOiJFUzI1NksiLCJ0eXAiOiJKV1QifQ.eyJ2YyI6eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSJdLCJ0eXBlIjpbIlZlcmlmaWFibGVDcmVkZW50aWFsIiwiUHJvZmlsZSJdLCJjcmVkZW50aWFsU3ViamVjdCI6eyJuYW1lIjoiYXNkIiwicGhvbmUiOiI0MzItNDMyNCIsInN1YiI6IjAxMDIyMjIzMzMzIn19LCJzdWIiOiJkaWQ6ZXRocjoweGI4MGE0MWNkNTNjM2E0MmZhYTVhNWY1OGU2MTkwOWU1MGRmODExZTAiLCJuYmYiOjE2NjYwODQ0NjIsImlzcyI6ImRpZDpldGhyOjB4ZDI4NGNkYzk2NGFmOGEwMWQ4MmQwY2FhN2RlZWJhODI3ODViNTRmNCJ9.PqUOVrxFI8Bmt2UKjJ2oF6oFNkV_0s9xzJczPwkDf8_fueJdBoK3OuOKnWPfS-wgSDTDMpyNlf_m27DoxvA1pA"
}
} ],
"holder" : "did:ethr:0xb80a41cd53c3a42faa5a5f58e61909e50df811e0",
"verifier" : [ "did:ethr:0xd284cdc964af8a01d82d0caa7deeba82785b54f4" ],
"type" : [ "VerifiablePresentation", "VerifiableCredential", "Profile" ],
"@context" : [ "https://www.w3.org/2018/credentials/v1" ],
"issuanceDate" : "2022-10-18T09:14:26.000Z",
"proof" : {
"type" : "JwtProof2020",
"jwt" : "eyJhbGciOiJFUzI1NksiLCJ0eXAiOiJKV1QifQ.eyJ2cCI6eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSJdLCJ0eXBlIjpbIlZlcmlmaWFibGVQcmVzZW50YXRpb24iLCJWZXJpZmlhYmxlQ3JlZGVudGlhbCIsIlByb2ZpbGUiXSwidmVyaWZpYWJsZUNyZWRlbnRpYWwiOlsiZXlKaGJHY2lPaUpGVXpJMU5rc2lMQ0owZVhBaU9pSktWMVFpZlEuZXlK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sInVzZXIiOiI0NzAwNjBFRkNCRUMwMDJDIiwiaWF0IjoxNjY2MTg2OTcwfQ.h9bMc-mmswRcI8vLfl1E-a65hcIvqdKikcj_50ZOI8k",
"userId": "01022223333",
"name": "test1",
"telNo": "01022223333",
"email": ""
}
The following auth-user-by-app, cancel-auth-user-by-app, and auth-user-result-by-app are provided for web site login. These APIs are used by the web server script.
Request DID login.
requestId
is an identifier that identifies the web site. In general, you can use the site URL + "?".waitTime
is the maximum waiting time for login.If successful, new
requestId
is issued. This value should be used to check if a user is logged in by the user application.
Example
curl -X 'POST' \
'{endpoint}/auth/auth-user-by-app' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"requestId": "https://my.domain?",
"waitTime": 60
}'
{
"requestId": "https://my.domain?requestId=1666327791844_5954",
"waitTime": 60
}
Cancel the authentication request.
requestId
is the id you want to cancel.waitTime
is ignored.
Example
curl -X 'POST' \
'{endpoint}/auth/cancel-auth-user-by-app' \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
-d '{
"requestId": "https://my.domain?requestId=1666328121807_6979"
}'
200 OK.
Check whether the login was successful.
requestId
is the ID that checks the login success response.waitTime
is ignored.If successful, you get a new JWT
token
. It also receives basic user information, such as username
,userId
,telNo
, andemail
.If there is no request or the request time is old, a 400 error occurs.
If you're waiting for a response from your app, you'll get a 401 error.
Example
curl -X 'POST' \
'{endpoint}/auth/auth-user-result-by-app' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"requestId": "https://my.domain?requestId=1666328121807_6979"
}'
Never requested:
{
"error": {
"code": "400",
"message": "Never requested or timeout"
}
}
Waiting for response from user app:
{
"error": {
"code": "401",
"message": "Wait for response from user app"
}
}
Log in normally:
{
"token": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI3MDA1NTUwMDAyIiwicm9sZSI6IlJPTEVfVVNFUiIsImV4cCI6MTY2Njc2MDYzMiwidXNlciI6IjQ3MDA2MzRGQjBGNDAwMUQiLCJpYXQiOjE2NjYzMjg2MzJ9.ltpfbFuoWEtOJRXZLAyvh5T2ZhG4g1GPjr-VwKF1AMk",
"userId": "7005550002",
"name": "dhjeon",
"telNo": null,
"email": "aaa0002@a.com"
}
DID (Decentralized Identifier)
Create your DID.
alias
is an alias for identifying a DID.Use the
address
andsecretKey
that came out when you create the address to authenticate yourself.
Example
curl -X 'POST' \
'{endpoint}/did/create-did' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"alias": "4700634FB09E0019",
"address": "0x38b45217e81548733f9fd7443ecfe4ea6b5725cf",
"secretKey": "a728102d411b1871f7ae91505b4e1558"
}'
{
"controllerKeyId": "0x38b45217e81548733f9fd7443ecfe4ea6b5725cf",
"provider": "did:ethr",
"keys": [
{
"kid": "0x38b45217e81548733f9fd7443ecfe4ea6b5725cf",
"kms": "...",
"type": "Secp256k1",
"publicKeyHex": "0x38b45217e81548733f9fd7443ecfe4ea6b5725cf",
"privateKeyHex": "",
"meta": {
"algorithms": [
"ES256K",
"ES256K-R",
"eth_signTransaction",
"eth_signTypedData",
"eth_signMessage"
],
"secretKey": "a728102d411b1871f7ae91505b4e1558"
}
}
],
"alias": "4700634FB09E0019",
"services": [],
"did": "did:ethr:0x38b45217e81548733f9fd7443ecfe4ea6b5725cf"
}
Create your VCs (Verifiable Credential).
Because this is the credentials used by this system, the JWT authenticated by /auth/auth-user in advance is required.
holder
is your issued DID.issuer
is the issuer DID provided by this authentication system.Provides additional information to
userInfo
in key/value format.If successful, you will get your VC.
Example
curl -X 'POST' \
'{endpoint}/did/create-vc' \
-H 'accept: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0Iiwicm9sZSI6IlJPTEVfVVNFUiIsImV4cCI6MTY2ODkyMzY5MSwidXNlciI6IjQ3MDA2MDM2NDRCNzAwMDQiLCJpYXQiOjE2NjYzMzE2OTF9.c2BMNGbTUNV6HQAIBy9nHOTEK8nZOex1r-ntO3KLlNY' \
-H 'Content-Type: application/json' \
-d '{
"holder": "did:ethr:0x38b45217e81548733f9fd7443ecfe4ea6b5725cf",
"issuer": "did:ethr:0xd284cdc964af8a01d82d0caa7deeba82785b54f4",
"userInfo": {
"name": "Hong"
}
}'
{
"credentialSubject": {
"name": "Hong",
"sub": "test",
"id": "did:ethr:0x38b45217e81548733f9fd7443ecfe4ea6b5725cf"
},
"issuanceDate": "2022-10-21T05:56:06.000Z",
"proof": {
"type": "JwtProof2020",
"jwt": "eyJhbGciOiJFUzI1NksiLCJ0eXAiOiJKV1QifQ.eyJ2YyI6eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSJdLCJ0eXBlIjpbIlZlcmlmaWFibGVDcmVkZW50aWFsIiwiUHJvZmlsZSJdLCJjcmVkZW50aWFsU3ViamVjdCI6eyJuYW1lIjoiSG9uZyIsInN1YiI6InRlc3QifX0sInN1YiI6ImRpZDpldGhyOjB4MzhiNDUyMTdlODE1NDg3MzNmOWZkNzQ0M2VjZmU0ZWE2YjU3MjVjZiIsIm5iZiI6MTY2NjMzMTc2NiwiaXNzIjoiZGlkOmV0aHI6MHhkMjg0Y2RjOTY0YWY4YTAxZDgyZDBjYWE3ZGVlYmE4Mjc4NWI1NGY0In0.IvrseTkX-lnadHg7TrPcBaTC5utYIr72nbQRgdNS_jwSPy4fypUxu7_2xaJw1IqHy71-uTp1B52hAz7ZeRb89g"
},
"type": [
"VerifiableCredential",
"Profile"
],
"@context": [
"https://www.w3.org/2018/credentials/v1"
],
"issuer": {
"id": "did:ethr:0xd284cdc964af8a01d82d0caa7deeba82785b54f4"
}
}
Verify the VC.
The
body
of the request has the VC.If successful,
verified
is true.
Example
curl -X 'POST' \
'{endpoint}/did/verify-vc' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"credentialSubject": {
"name": "Hong",
"sub": "test",
"id": "did:ethr:0x38b45217e81548733f9fd7443ecfe4ea6b5725cf"
},
"issuanceDate": "2022-10-21T05:56:06.000Z",
"proof": {
"type": "JwtProof2020",
"jwt": "eyJhbGciOiJFUzI1NksiLCJ0eXAiOiJKV1QifQ.eyJ2YyI6eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSJdLCJ0eXBlIjpbIlZlcmlmaWFibGVDcmVkZW50aWFsIiwiUHJvZmlsZSJdLCJjcmVkZW50aWFsU3ViamVjdCI6eyJuYW1lIjoiSG9uZyIsInN1YiI6InRlc3QifX0sInN1YiI6ImRpZDpldGhyOjB4MzhiNDUyMTdlODE1NDg3MzNmOWZkNzQ0M2VjZmU0ZWE2YjU3MjVjZiIsIm5iZiI6MTY2NjMzMTc2NiwiaXNzIjoiZGlkOmV0aHI6MHhkMjg0Y2RjOTY0YWY4YTAxZDgyZDBjYWE3ZGVlYmE4Mjc4NWI1NGY0In0.IvrseTkX-lnadHg7TrPcBaTC5utYIr72nbQRgdNS_jwSPy4fypUxu7_2xaJw1IqHy71-uTp1B52hAz7ZeRb89g"
},
"type": [
"VerifiableCredential",
"Profile"
],
"@context": [
"https://www.w3.org/2018/credentials/v1"
],
"issuer": {
"id": "did:ethr:0xd284cdc964af8a01d82d0caa7deeba82785b54f4"
}
{
"didResolutionResult": {
"didDocumentMetadata": {},
"didResolutionMetadata": {
"contentType": "application/did+ld+json"
},
"didDocument": {
"@context": [
"https://www.w3.org/ns/did/v1",
"https://w3id.org/security/suites/secp256k1recovery-2020/v2"
],
"id": "did:ethr:0xd284cdc964af8a01d82d0caa7deeba82785b54f4",
"verificationMethod": [
{
"id": "did:ethr:0xd284cdc964af8a01d82d0caa7deeba82785b54f4#controller",
"type": "EcdsaSecp256k1RecoveryMethod2020",
"controller": "did:ethr:0xd284cdc964af8a01d82d0caa7deeba82785b54f4",
"blockchainAccountId": "eip155:1:0xd284CDC964aF8a01d82D0cAA7DeeBA82785B54f4"
}
],
"authentication": [
"did:ethr:0xd284cdc964af8a01d82d0caa7deeba82785b54f4#controller"
],
"assertionMethod": [
"did:ethr:0xd284cdc964af8a01d82d0caa7deeba82785b54f4#controller"
]
}
},
"payload": {
"vc": {
"@context": [
"https://www.w3.org/2018/credentials/v1"
],
"type": [
"VerifiableCredential",
"Profile"
],
"credentialSubject": {
"name": "Hong",
"sub": "test"
}
},
"sub": "did:ethr:0x38b45217e81548733f9fd7443ecfe4ea6b5725cf",
"nbf": 1666331766,
"iss": "did:ethr:0xd284cdc964af8a01d82d0caa7deeba82785b54f4"
},
"jwt": "eyJhbGciOiJFUzI1NksiLCJ0eXAiOiJKV1QifQ.eyJ2YyI6eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSJdLCJ0eXBlIjpbIlZlcmlmaWFibGVDcmVkZW50aWFsIiwiUHJvZmlsZSJdLCJjcmVkZW50aWFsU3ViamVjdCI6eyJuYW1lIjoiSG9uZyIsInN1YiI6InRlc3QifX0sInN1YiI6ImRpZDpldGhyOjB4MzhiNDUyMTdlODE1NDg3MzNmOWZkNzQ0M2VjZmU0ZWE2YjU3MjVjZiIsIm5iZiI6MTY2NjMzMTc2NiwiaXNzIjoiZGlkOmV0aHI6MHhkMjg0Y2RjOTY0YWY4YTAxZDgyZDBjYWE3ZGVlYmE4Mjc4NWI1NGY0In0.IvrseTkX-lnadHg7TrPcBaTC5utYIr72nbQRgdNS_jwSPy4fypUxu7_2xaJw1IqHy71-uTp1B52hAz7ZeRb89g",
"verified": true,
"policies": {},
"issuer": "did:ethr:0xd284cdc964af8a01d82d0caa7deeba82785b54f4",
"signer": {
"id": "did:ethr:0xd284cdc964af8a01d82d0caa7deeba82785b54f4#controller",
"type": "EcdsaSecp256k1RecoveryMethod2020",
"controller": "did:ethr:0xd284cdc964af8a01d82d0caa7deeba82785b54f4",
"blockchainAccountId": "eip155:1:0xd284CDC964aF8a01d82D0cAA7DeeBA82785B54f4"
},
"verifiableCredential": {
"credentialSubject": {
"name": "Hong",
"sub": "test",
"id": "did:ethr:0x38b45217e81548733f9fd7443ecfe4ea6b5725cf"
},
"issuer": {
"id": "did:ethr:0xd284cdc964af8a01d82d0caa7deeba82785b54f4"
},
"type": [
"VerifiableCredential",
"Profile"
],
"@context": [
"https://www.w3.org/2018/credentials/v1"
],
"issuanceDate": "2022-10-21T05:56:06.000Z",
"proof": {
"type": "JwtProof2020",
"jwt": "eyJhbGciOiJFUzI1NksiLCJ0eXAiOiJKV1QifQ.eyJ2YyI6eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSJdLCJ0eXBlIjpbIlZlcmlmaWFibGVDcmVkZW50aWFsIiwiUHJvZmlsZSJdLCJjcmVkZW50aWFsU3ViamVjdCI6eyJuYW1lIjoiSG9uZyIsInN1YiI6InRlc3QifX0sInN1YiI6ImRpZDpldGhyOjB4MzhiNDUyMTdlODE1NDg3MzNmOWZkNzQ0M2VjZmU0ZWE2YjU3MjVjZiIsIm5iZiI6MTY2NjMzMTc2NiwiaXNzIjoiZGlkOmV0aHI6MHhkMjg0Y2RjOTY0YWY4YTAxZDgyZDBjYWE3ZGVlYmE4Mjc4NWI1NGY0In0.IvrseTkX-lnadHg7TrPcBaTC5utYIr72nbQRgdNS_jwSPy4fypUxu7_2xaJw1IqHy71-uTp1B52hAz7ZeRb89g"
}
}
}
Create your VP (Verifiable Presentation).
holder
is your DID.verifier
is the verifier DID provided by this authentication system.credentials
contains a list of VCs.If succesful, your VP is created.
Example
curl -X 'POST' \
'{endpoint}/did/create-vp' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"holder": "did:ethr:0xa54545a4e45cf5a229438695c6bea23c5d1414c9",
"verifier": "did:ethr:0xd284cdc964af8a01d82d0caa7deeba82785b54f4",
"credentials": [
{
"credentialSubject" : {
"userId" : "sus",
"name" : "ss",
"phone" : "019-3992-6444",
"birthdate" : "2022-10-19",
"dRegNumber" : "ss",
"sub" : "7005550002",
"id" : "did:ethr:0xa54545a4e45cf5a229438695c6bea23c5d1414c9"
},
"issuer" : {
"id" : "did:ethr:0xa3bbf50a3c3a4180521325cb99ea301142b3634e"
},
"type" : [ "VerifiableCredential", "Profile" ],
"@context" : [ "https://www.w3.org/2018/credentials/v1" ],
"issuanceDate" : "2022-10-19T10:42:13.000Z",
"proof" : {
"type" : "JwtProof2020",
"jwt" : "eyJhbGciOiJFUzI1NksiLCJ0eXAiOiJKV1QifQ.eyJ2YyI6eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSJdLCJ0eXBlIjpbIlZlcmlmaWFibGVDcmVkZW50aWFsIiwiUHJvZmlsZSJdLCJjcmVkZW50aWFsU3ViamVjdCI6eyJ1c2VySWQiOiJzdXMiLCJuYW1lIjoic3MiLCJwaG9uZSI6IjAxOS0zOTkyLTY0NDQiLCJiaXJ0aGRhdGUiOiIyMDIyLTEwLTE5IiwiZFJlZ051bWJlciI6InNzIiwic3ViIjoiNzAwNTU1MDAwMiJ9fSwic3ViIjoiZGlkOmV0aHI6MHhhNTQ1NDVhNGU0NWNmNWEyMjk0Mzg2OTVjNmJlYTIzYzVkMTQxNGM5IiwibmJmIjoxNjY2MTc2MTMzLCJpc3MiOiJkaWQ6ZXRocjoweGEzYmJmNTBhM2MzYTQxODA1MjEzMjVjYjk5ZWEzMDExNDJiMzYzNGUifQ.LrTCG_SPXE-qpicQvTlaw666cmDpsZEILPpCAVRMBbjB-Yp-GMY0arqTxgc0rTRD3XlXV57JhCkZKYBZ261Dxg"
}
}
]
}'
{
"issuanceDate": "2022-10-21T06:16:23.000Z",
"verifier": [
"did:ethr:0xd284cdc964af8a01d82d0caa7deeba82785b54f4"
],
"holder": "did:ethr:0xa54545a4e45cf5a229438695c6bea23c5d1414c9",
"proof": {
"type": "JwtProof2020",
"jwt": "eyJhbGciOiJFUzI1NksiLCJ0eXAiOiJKV1QifQ.eyJ2cCI6eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vc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5NWM2YmVhMjNjNWQxNDE0YzkiLCJhdWQiOlsiZGlkOmV0aHI6MHhkMjg0Y2RjOTY0YWY4YTAxZDgyZDBjYWE3ZGVlYmE4Mjc4NWI1NGY0Il19.AjFvyK-4yYH7PHMZT2c-ZsBiquX8ZPZARwmMHcYNtkup15CqCgq1GFcQOWEtvDfwkj8abJH4kH4ffCreWR1tWQ"
},
"type": [
"VerifiablePresentation",
"VerifiableCredential",
"Profile"
],
"@context": [
"https://www.w3.org/2018/credentials/v1"
],
"verifiableCredential": [
{
"credentialSubject": {
"userId": "sus",
"name": "ss",
"phone": "019-3992-6444",
"birthdate": "2022-10-19",
"dRegNumber": "ss",
"sub": "7005550002",
"id": "did:ethr:0xa54545a4e45cf5a229438695c6bea23c5d1414c9"
},
"issuer": {
"id": "did:ethr:0xa3bbf50a3c3a4180521325cb99ea301142b3634e"
},
"type": [
"VerifiableCredential",
"Profile"
],
"@context": [
"https://www.w3.org/2018/credentials/v1"
],
"issuanceDate": "2022-10-19T10:42:13.000Z",
"proof": {
"type": "JwtProof2020",
"jwt": "eyJhbGciOiJFUzI1NksiLCJ0eXAiOiJKV1QifQ.eyJ2YyI6eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSJdLCJ0eXBlIjpbIlZlcmlmaWFibGVDcmVkZW50aWFsIiwiUHJvZmlsZSJdLCJjcmVkZW50aWFsU3ViamVjdCI6eyJ1c2VySWQiOiJzdXMiLCJuYW1lIjoic3MiLCJwaG9uZSI6IjAxOS0zOTkyLTY0NDQiLCJiaXJ0aGRhdGUiOiIyMDIyLTEwLTE5IiwiZFJlZ051bWJlciI6InNzIiwic3ViIjoiNzAwNTU1MDAwMiJ9fSwic3ViIjoiZGlkOmV0aHI6MHhhNTQ1NDVhNGU0NWNmNWEyMjk0Mzg2OTVjNmJlYTIzYzVkMTQxNGM5IiwibmJmIjoxNjY2MTc2MTMzLCJpc3MiOiJkaWQ6ZXRocjoweGEzYmJmNTBhM2MzYTQxODA1MjEzMjVjYjk5ZWEzMDExNDJiMzYzNGUifQ.LrTCG_SPXE-qpicQvTlaw666cmDpsZEILPpCAVRMBbjB-Yp-GMY0arqTxgc0rTRD3XlXV57JhCkZKYBZ261Dxg"
}
}
]
}
Verify the VP
The
body
of the request has the VP.If successful,
verified
is true.
Example
{
"issuanceDate": "2022-10-21T06:16:23.000Z",
"verifier": [
"did:ethr:0xd284cdc964af8a01d82d0caa7deeba82785b54f4"
],
"holder": "did:ethr:0xa54545a4e45cf5a229438695c6bea23c5d1414c9",
"proof": {
"type": "JwtProof2020",
"jwt": "eyJhbGciOiJFUzI1NksiLCJ0eXAiOiJKV1QifQ.eyJ2cCI6eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSJdLCJ0eXBlIjpbIlZlcmlmaWFibGVQcmVzZW50YXRpb24iLCJWZXJpZmlhYmxlQ3JlZGVudGlhbCIsIlByb2ZpbGUiXSwidmVyaWZpYWJsZUNyZWRlbnRpYWwiOlsiZXlKaGJHY2lPaUpGVXpJMU5rc2lMQ0owZVhBaU9pSktWMVFpZlEuZXlKMll5STZleUpBWTI5dWRHVjRkQ0k2V3lKb2RIUndjem92TDNkM2R5NTNNeTV2Y21jdk1qQXhPQzlqY21Wa1pXNTBhV0ZzY3k5Mk1TSmRMQ0owZVhCbElqcGJJbFpsY21sbWFXRmliR1ZEY21Wa1pXNTBhV0ZzSWl3aVVISnZabWxzWlNKZExDSmpjbVZrWlc1MGFXRnNVM1ZpYW1WamRDSTZleUoxYzJWeVNXUWlPaUp6ZFhNaUxDSnVZVzFsSWpvaWMzTWlMQ0p3YUc5dVpTSTZJakF4T1Mwek9Ua3lMVFkwTkRRaUxDSmlhWEowYUdSaGRHVWlPaUl5TURJeUxURXdMVEU1SWl3aVpGSmxaMDUxYldKbGNpSTZJbk56SWl3aWMzVmlJam9pTnpBd05UVTFNREF3TWlKOWZTd2ljM1ZpSWpvaVpHbGtPbVYwYUhJNk1IaGhOVFExTkRWaE5HVTBOV05tTldFeU1qazBNemcyT1RWak5tSmxZVEl6WXpWa01UUXhOR001SWl3aWJtSm1Jam94TmpZMk1UYzJNVE16TENKcGMzTWlPaUprYVdRNlpYUm9jam93ZUdFelltSm1OVEJoTTJNellUUXhPREExTWpFek1qVmpZams1WldFek1ERXhOREppTXpZek5HVWlmUS5MclRDR19TUFhFLXFwaWNRdlRsYXc2NjZjbURwc1pFSUxQcENBVlJNQmJqQi1ZcC1HTVkwYXJxVHhnYzByVFJEM1hsWFY1N0poQ2taS1lCWjI2MUR4ZyJdfSwibmJmIjoxNjY2MzMyOTgzLCJpc3MiOiJkaWQ6ZXRocjoweGE1NDU0NWE0ZTQ1Y2Y1YTIyOTQzODY5NWM2YmVhMjNjNWQxNDE0YzkiLCJhdWQiOlsiZGlkOmV0aHI6MHhkMjg0Y2RjOTY0YWY4YTAxZDgyZDBjYWE3ZGVlYmE4Mjc4NWI1NGY0Il19.AjFvyK-4yYH7PHMZT2c-ZsBiquX8ZPZARwmMHcYNtkup15CqCgq1GFcQOWEtvDfwkj8abJH4kH4ffCreWR1tWQ"
},
"type": [
"VerifiablePresentation",
"VerifiableCredential",
"Profile"
],
"@context": [
"https://www.w3.org/2018/credentials/v1"
],
"verifiableCredential": [
{
"credentialSubject": {
"userId": "sus",
"name": "ss",
"phone": "019-3992-6444",
"birthdate": "2022-10-19",
"dRegNumber": "ss",
"sub": "7005550002",
"id": "did:ethr:0xa54545a4e45cf5a229438695c6bea23c5d1414c9"
},
"issuer": {
"id": "did:ethr:0xa3bbf50a3c3a4180521325cb99ea301142b3634e"
},
"type": [
"VerifiableCredential",
"Profile"
],
"@context": [
"https://www.w3.org/2018/credentials/v1"
],
"issuanceDate": "2022-10-19T10:42:13.000Z",
"proof": {
"type": "JwtProof2020",
"jwt": "eyJhbGciOiJFUzI1NksiLCJ0eXAiOiJKV1QifQ.eyJ2YyI6eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSJdLCJ0eXBlIjpbIlZlcmlmaWFibGVDcmVkZW50aWFsIiwiUHJvZmlsZSJdLCJjcmVkZW50aWFsU3ViamVjdCI6eyJ1c2VySWQiOiJzdXMiLCJuYW1lIjoic3MiLCJwaG9uZSI6IjAxOS0zOTkyLTY0NDQiLCJiaXJ0aGRhdGUiOiIyMDIyLTEwLTE5IiwiZFJlZ051bWJlciI6InNzIiwic3ViIjoiNzAwNTU1MDAwMiJ9fSwic3ViIjoiZGlkOmV0aHI6MHhhNTQ1NDVhNGU0NWNmNWEyMjk0Mzg2OTVjNmJlYTIzYzVkMTQxNGM5IiwibmJmIjoxNjY2MTc2MTMzLCJpc3MiOiJkaWQ6ZXRocjoweGEzYmJmNTBhM2MzYTQxODA1MjEzMjVjYjk5ZWEzMDExNDJiMzYzNGUifQ.LrTCG_SPXE-qpicQvTlaw666cmDpsZEILPpCAVRMBbjB-Yp-GMY0arqTxgc0rTRD3XlXV57JhCkZKYBZ261Dxg"
}
}
]
}
{
"didResolutionResult": {
"didDocumentMetadata": {},
"didResolutionMetadata": {
"contentType": "application/did+ld+json"
},
"didDocument": {
"@context": [
"https://www.w3.org/ns/did/v1",
"https://w3id.org/security/suites/secp256k1recovery-2020/v2"
],
"id": "did:ethr:0xa54545a4e45cf5a229438695c6bea23c5d1414c9",
"verificationMethod": [
{
"id": "did:ethr:0xa54545a4e45cf5a229438695c6bea23c5d1414c9#controller",
"type": "EcdsaSecp256k1RecoveryMethod2020",
"controller": "did:ethr:0xa54545a4e45cf5a229438695c6bea23c5d1414c9",
"blockchainAccountId": "eip155:1:0xA54545a4e45CF5a229438695C6Bea23C5d1414c9"
}
],
"authentication": [
"did:ethr:0xa54545a4e45cf5a229438695c6bea23c5d1414c9#controller"
],
"assertionMethod": [
"did:ethr:0xa54545a4e45cf5a229438695c6bea23c5d1414c9#controller"
]
}
},
"verifiablePresentation": {
"verifiableCredential": [
{
"credentialSubject": {
"userId": "sus",
"name": "ss",
"phone": "019-3992-6444",
"birthdate": "2022-10-19",
"dRegNumber": "ss",
"sub": "7005550002",
"id": "did:ethr:0xa54545a4e45cf5a229438695c6bea23c5d1414c9"
},
"issuer": {
"id": "did:ethr:0xa3bbf50a3c3a4180521325cb99ea301142b3634e"
},
"type": [
"VerifiableCredential",
"Profile"
],
"@context": [
"https://www.w3.org/2018/credentials/v1"
],
"issuanceDate": "2022-10-19T10:42:13.000Z",
"proof": {
"type": "JwtProof2020",
"jwt": "eyJhbGciOiJFUzI1NksiLCJ0eXAiOiJKV1QifQ.eyJ2YyI6eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSJdLCJ0eXBlIjpbIlZlcmlmaWFibGVDcmVkZW50aWFsIiwiUHJvZmlsZSJdLCJjcmVkZW50aWFsU3ViamVjdCI6eyJ1c2VySWQiOiJzdXMiLCJuYW1lIjoic3MiLCJwaG9uZSI6IjAxOS0zOTkyLTY0NDQiLCJiaXJ0aGRhdGUiOiIyMDIyLTEwLTE5IiwiZFJlZ051bWJlciI6InNzIiwic3ViIjoiNzAwNTU1MDAwMiJ9fSwic3ViIjoiZGlkOmV0aHI6MHhhNTQ1NDVhNGU0NWNmNWEyMjk0Mzg2OTVjNmJlYTIzYzVkMTQxNGM5IiwibmJmIjoxNjY2MTc2MTMzLCJpc3MiOiJkaWQ6ZXRocjoweGEzYmJmNTBhM2MzYTQxODA1MjEzMjVjYjk5ZWEzMDExNDJiMzYzNGUifQ.LrTCG_SPXE-qpicQvTlaw666cmDpsZEILPpCAVRMBbjB-Yp-GMY0arqTxgc0rTRD3XlXV57JhCkZKYBZ261Dxg"
}
}
],
"holder": "did:ethr:0xa54545a4e45cf5a229438695c6bea23c5d1414c9",
"verifier": [
"did:ethr:0xd284cdc964af8a01d82d0caa7deeba82785b54f4"
],
"type": [
"VerifiablePresentation",
"VerifiableCredential",
"Profile"
],
"@context": [
"https://www.w3.org/2018/credent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Qi1ZcC1HTVkwYXJxVHhnYzByVFJEM1hsWFY1N0poQ2taS1lCWjI2MUR4ZyJdfSwibmJmIjoxNjY2MzMyOTgzLCJpc3MiOiJkaWQ6ZXRocjoweGE1NDU0NWE0ZTQ1Y2Y1YTIyOTQzODY5NWM2YmVhMjNjNWQxNDE0YzkiLCJhdWQiOlsiZGlkOmV0aHI6MHhkMjg0Y2RjOTY0YWY4YTAxZDgyZDBjYWE3ZGVlYmE4Mjc4NWI1NGY0Il19.AjFvyK-4yYH7PHMZT2c-ZsBiquX8ZPZARwmMHcYNtkup15CqCgq1GFcQOWEtvDfwkj8abJH4kH4ffCreWR1tWQ"
}
},
"payload": {
"vp": {
"@context": [
"https://www.w3.org/2018/credentials/v1"
],
"type": [
"VerifiablePresentation",
"VerifiableCredential",
"Profile"
],
"verifiableCredential": [
"eyJhbGciOiJFUzI1NksiLCJ0eXAiOiJKV1QifQ.eyJ2YyI6eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSJdLCJ0eXBlIjpbIlZlcmlmaWFibGVDcmVkZW50aWFsIiwiUHJvZmlsZSJdLCJjcmVkZW50aWFsU3ViamVjdCI6eyJ1c2VySWQiOiJzdXMiLCJuYW1lIjoic3MiLCJwaG9uZSI6IjAxOS0zOTkyLTY0NDQiLCJiaXJ0aGRhdGUiOiIyMDIyLTEwLTE5IiwiZFJlZ051bWJlciI6InNzIiwic3ViIjoiNzAwNTU1MDAwMiJ9fSwic3ViIjoiZGlkOmV0aHI6MHhhNTQ1NDVhNGU0NWNmNWEyMjk0Mzg2OTVjNmJlYTIzYzVkMTQxNGM5IiwibmJmIjoxNjY2MTc2MTMzLCJpc3MiOiJkaWQ6ZXRocjoweGEzYmJmNTBhM2MzYTQxODA1MjEzMjVjYjk5ZWEzMDExNDJiMzYzNGUifQ.LrTCG_SPXE-qpicQvTlaw666cmDpsZEILPpCAVRMBbjB-Yp-GMY0arqTxgc0rTRD3XlXV57JhCkZKYBZ261Dxg"
]
},
"nbf": 1666332983,
"iss": "did:ethr:0xa54545a4e45cf5a229438695c6bea23c5d1414c9",
"aud": [
"did:ethr:0xd284cdc964af8a01d82d0caa7deeba82785b54f4"
]
},
"jwt": "eyJhbGciOiJFUzI1NksiLCJ0eXAiOiJKV1QifQ.eyJ2cCI6eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSJdLCJ0eXBlIjpbIlZlcmlmaWFibGVQcmVzZW50YXRpb24iLCJWZXJpZmlhYmxlQ3JlZGVudGlhbCIsIlByb2ZpbGUiXSwidmVyaWZpYWJsZUNyZWRlbnRpYWwiOlsiZXlKaGJHY2lPaUpGVXpJMU5rc2lMQ0owZVhBaU9pSktWMVFpZlEuZXlKMll5STZleUpBWTI5dWRHVjRkQ0k2V3lKb2RIUndjem92TDNkM2R5NTNNeTV2Y21jdk1qQXhPQzlqY21Wa1pXNTBhV0ZzY3k5Mk1TSmRMQ0owZVhCbElqcGJJbFpsY21sbWFXRmliR1ZEY21Wa1pXNTBhV0ZzSWl3aVVISnZabWxzWlNKZExDSmpjbVZrWlc1MGFXRnNVM1ZpYW1WamRDSTZleUoxYzJWeVNXUWlPaUp6ZFhNaUxDSnVZVzFsSWpvaWMzTWlMQ0p3YUc5dVpTSTZJakF4T1Mwek9Ua3lMVFkwTkRRaUxDSmlhWEowYUdSaGRHVWlPaUl5TURJeUxURXdMVEU1SWl3aVpGSmxaMDUxYldKbGNpSTZJbk56SWl3aWMzVmlJam9pTnpBd05UVTFNREF3TWlKOWZTd2ljM1ZpSWpvaVpHbGtPbVYwYUhJNk1IaGhOVFExTkRWaE5HVTBOV05tTldFeU1qazBNemcyT1RWak5tSmxZVEl6WXpWa01UUXhOR001SWl3aWJtSm1Jam94TmpZMk1UYzJNVE16TENKcGMzTWlPaUprYVdRNlpYUm9jam93ZUdFelltSm1OVEJoTTJNellUUXhPREExTWpFek1qVmpZams1WldFek1ERXhOREppTXpZek5HVWlmUS5MclRDR19TUFhFLXFwaWNRdlRsYXc2NjZjbURwc1pFSUxQcENBVlJNQmJqQi1ZcC1HTVkwYXJxVHhnYzByVFJEM1hsWFY1N0poQ2taS1lCWjI2MUR4ZyJdfSwibmJmIjoxNjY2MzMyOTgzLCJpc3MiOiJkaWQ6ZXRocjoweGE1NDU0NWE0ZTQ1Y2Y1YTIyOTQzODY5NWM2YmVhMjNjNWQxNDE0YzkiLCJhdWQiOlsiZGlkOmV0aHI6MHhkMjg0Y2RjOTY0YWY4YTAxZDgyZDBjYWE3ZGVlYmE4Mjc4NWI1NGY0Il19.AjFvyK-4yYH7PHMZT2c-ZsBiquX8ZPZARwmMHcYNtkup15CqCgq1GFcQOWEtvDfwkj8abJH4kH4ffCreWR1tWQ",
"verified": true,
"policies": {},
"issuer": "did:ethr:0xa54545a4e45cf5a229438695c6bea23c5d1414c9",
"signer": {
"id": "did:ethr:0xa54545a4e45cf5a229438695c6bea23c5d1414c9#controller",
"type": "EcdsaSecp256k1RecoveryMethod2020",
"controller": "did:ethr:0xa54545a4e45cf5a229438695c6bea23c5d1414c9",
"blockchainAccountId": "eip155:1:0xA54545a4e45CF5a229438695C6Bea23C5d1414c9"
}
}
List issuers and verifiers.
Example
curl -X 'GET' \
'{endpoint}/did/issuers' \
-H 'accept: application/json'
[
{
"alias": "...",
"did": "did:ethr:0xd284cdc964af8a01d82d0caa7deeba82785b54f4"
},
{
"alias": "...",
"did": "did:ethr:0xa3bbf50a3c3a4180521325cb99ea301142b3634e"
}
]
Examples
curl -X 'GET' \
'{endpoint}/did/verifiers' \
-H 'accept: application/json'
[
{
"alias": "...",
"did": "did:ethr:0xd284cdc964af8a01d82d0caa7deeba82785b54f4"
},
{
"alias": "...",
"did": "did:ethr:0xa3bbf50a3c3a4180521325cb99ea301142b3634e"
}
]
Last updated