moonstream-to / waggle

Apache License 2.0
2 stars 2 forks source link

Holders endpoints #29

Closed kompotkot closed 5 months ago

kompotkot commented 5 months ago

To handle holders access to API

List holders:

curl  'http://localhost:7379/holders' --header 'Authorization: Bearer <access_token>'

Add new holder:

curl --request POST 'http://localhost:7379/holders' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <access_token>' \
--data '{
    "holder_id": "<user_id>",
    "holder_type": "user",
    "permissions": ["read"]
}
'

Remove access to signer:

curl --request DELETE 'http://localhost:7379/holders' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <access_token>' \
--data '{
    "holder_id": "<user_id>",
    "holder_type": "user",
    "permissions": ["read"]
}
kompotkot commented 5 months ago