ЕСОЗ - публічна документація
RC_warranty_Delete approval (apps)
Purpose
This WS is designed to delete existing approval to revoke access granted to client. Deleting approval will force client to re-request access from user
Key points
Only active approvals is returned
Approvals filtered by the user based on token details
It is allowed to search approvals (e.g.: by client name)
Specification
Validate request
Validate x-consumer-id (user)
Ensure that header
x-consumer-id
passed to requestin case of error - 401 ('Unauthorized')
Validate resource owner
Ensure that requested resource belongs to the authenticated user (invoke Mithril.Rpc,
:app_by_id
, check that user_id = x-consumer-id)in case of error - 403 ('Forbidden')
Validate approval
Check that approval doesn’t belongs to the trusted
client_type.name
according step 3 service logic of Get Approvals
Service logic
Delete approvals in Mithril
Service must operate only with user-related approvals
Call Mithril to delete requested approval and all associated active tokens
Mithril.Api
Mithril.Rpc: :delete_app
ЕСОЗ - публічна документація