Skip to content

Identification

Lars Westermann edited this page Jan 30, 2020 · 2 revisions

/api/v1/identify

Use to identify a bar-/qr-code or a nfc card.

POST

Request Body

Identify bar-/qr-code

{
    "type": "barcode",
    "code": "0000000"
}

Identify nfc-card

{
    "type": "nfc",
    "id": "00-00-00-00:00-00-00-00-00-00"
}

Identify nfc-card with challenge-response

{
    "type": "nfc-secret",
    "id": "00-00-00-00:00-00-00-00-00-00",
    "challenge": "<<challenge from server>>",
    "response": "<<calculated response>>"
}

Response body

Identifies as account

{
    "type": "account",
    "account": <<Account>>
}

Identifies as product

{
    "type": "product",
    "account": <<Product>>
}

nfc card needs challenge-response authentication

{
    "type": "authentication-needed",
    "id": "00-00-00-00:00-00-00-00-00-00",
    "key": "<<encryption key for nfc card>>",
    "challenge": "<<challenge from server>>"
}

nfc card is in registration process, write card secrets

{
    "type": "write-key",
    "id": "00-00-00-00:00-00-00-00-00-00",
    "key": "<<encryption key for nfc card>>",
    "secret": "<<nfc card secret to be stored on the card>>"
}
Clone this wiki locally