WebOfTrust / keria

KERI Agent in the cloud
https://keria.readthedocs.io/en/latest/
Apache License 2.0
17 stars 26 forks source link

Contact challenges missing from GET /contacts/{prefix} #173

Open lenkan opened 5 months ago

lenkan commented 5 months ago

Currently, you can get challenge information for a contact using the list contacts endpoint (GET /contacts). It is added here: https://github.com/WebOfTrust/keria/blob/f24cf4b01932916cc640ff6f20ffda6f641c1ad2/src/keria/app/aiding.py#L1143-L1167, yielding an array response with the following shape:

  id: string;
  alias: string;
  oobi: string;
  challenges: Challenge[];

On the endpoint for getting a contact by id, this information is missing: https://github.com/WebOfTrust/keria/blob/f24cf4b01932916cc640ff6f20ffda6f641c1ad2/src/keria/app/aiding.py#L1294-L1303 yielding a response with the following shape:

  id: string;
  alias: string;
  oobi: string;

Is it intentional? If yes, what is the preferred way to get the current challenge responses for a specific contact? If not, should we add this information to ContactResource as well?

Another option could be to remove the challenges from the ContactCollectionResource as well and add a new endpoint /contacts/{prefix}/challenges. Thoughts?

lenkan commented 5 months ago

I also noticed that in keria, we have four "methods" for challenges, but in keripy / kli we only have three.