ЕСОЗ - публічна документація

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

  1. Only active approvals is returned

  2. Approvals filtered by the user based on token details

  3. It is allowed to search approvals (e.g.: by client name)

Specification

Apiary

Validate request

Validate x-consumer-id (user)

  • Ensure that header x-consumer-id passed to request

    • in 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

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

ЕСОЗ - публічна документація