key

Agent Server REST API

addsymmetrickey

POST http://dev.whitehat.co.kr/agent/v1/key/addsymmetrickey

API that searches the symmetric key

Headers

Name
Type
Description

X-AGENT-API-TOKEN

string

required token for searching the Agent API (issuing console)

Request Body

Name
Type
Description

id

string

id of the symmetric key

key

string

symmetric key

{
  "code": 200,
  "message": "Success"
}

Request Parameter example (JSON)

{
  "id": "5521EB5EF1402BE18D13C2054B606CC81",
  "key": "5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"
}

getsymmetrickey

POST http://dev.whitehat.co.kr/agent/v1/key/getsymmetrickey

API that searches the symmetric key

Headers

Name
Type
Description

X-AGENT-API-TOKEN

string

required token for searching the Agent API (issuing console)

Request Body

Name
Type
Description

id

string

symmetric key to search

issuerDid

string

Issuer's DID who issued the VC

serviceCode

string

SP's service code

spDid

string

SP's DID who is requesting for the VC verification

token

string

Issued token with the getauthtoken API

userDid

string

Targeted user DID the VC verification

vcDefCode

string

Definition code for the VC verification

cost

string

VC verification cost

{
  "code": 200,
  "message": "Success",
  "body": {
    "key": "a317c1afb43c49e01aba"
  }
}

Request Parameter example (JSON)

{
    "id":"oQaQjAt9mRExxao5Gh1HNnUhcKepkWbVTXtjjv1fV1M",
    "issuerDid":"dev.iss2",
    "serviceCode":"studentsvc",
    "spDid":"did:omn:dev.sp2",
    "token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiJkaWQ6b21uOmRldi5zcDIiLCJpYXQiOjE1OTE5MzY2NzgsImV4cCI6MTU5NDUyODY3OH0.Yj765xyUXUdFU3ZZqSTNEPYLoT3svRlQyVUFoU6BGoo",
    "userDid":"5cmgo5msmu5d",
    "vcDefCode":"studentdef",
    "cost":"1"
}

getauthtoken

POST http://dev.whitehat.co.kr/agent/v1/key/getauthtoken

API that issues token with the SP proof to search the symmetric key

Headers

Name
Type
Description

string

required token for searching the Agent API (issuing console)

Request Body

Name
Type
Description

id

string

SP's DID

proof

string

SP's Proof information

type

string

Proof type information

Request Parameter example (JSON)

{
  "id": "did:omn:dev.sp2",
  "proof": {
    "created": "2020-06-16T09:38:35",
    "creator": "did:omn:dev.sp2#key1",
    "nonce": "6Ti2owGWpiJjun",
    "signatureValue": "3k9S2XZcNQBKfHJaKvBGvf7JET85EF8VDkUidvm4aR8Z27iCTcyQuvrD6QjRZvTsVh9w7CSoBqpDs5BTPT4PMJGzq",
    "type": "Secp256k1VerificationKey2018"
  },
  "type": "default"
}

Last updated