Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [hono-dev] Credentials API Question

Hi Alexander,

 

Yes, this is explicitly supported.

In the tests of the device registry service you can find an example that contains such a case for the device ‘4711’.

 

"device-id" : "4711",

    "type" : "hashed-password",

    "auth-id" : "sensor1",

. . .

 

 

device-id" : "4711",

    "type" : "hashed-password",

    "auth-id" : "sensor2",

 

 

Please refer to the file

 

services/device-registry/src/test/resources/credentials.json

 

Best regards,

Karsten (sysexcontrol)

From: hono-dev-bounces@xxxxxxxxxxx [mailto:hono-dev-bounces@xxxxxxxxxxx] On Behalf Of Mack Alexander (INST/ECS4)
Sent: Dienstag, 6. Februar 2018 15:34
To: hono-dev@xxxxxxxxxxx
Subject: [hono-dev] Credentials API Question

 

Quick question about the device registry API and the credentials API.

 

The credentials API uniqueness constrain specifies, that the 'auth_id' and 'type' combination is unique in a tenant. So can we assign two credentials of the same type to one device?

 

Example:

 

Credentials:

{ "auth_id": "user_1", "type": "password", "device_id" : "device_1" }

{ "auth_id": "user_2", "type": "password", "device_id" : "device_1" } //so uniqueness is ok

 

Device:

{"device_id" : "device_1" } 

 

Is my understanding of the spec correct?

 

Cheers

 

 


Back to the top