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

RC_(CSI-1323)_Resend Authorization OTP on Confidant Person relationship

Purpose

This method is used when you need to resend SMS to a confidant person.

Specification

Apiary

Authorization

  • Verify the validity of access token

    • Return (401, 'Invalid access token') in case of validation fails

  • Verify that token is not expired

    • in case of error - return (401, 'Invalid access token')

  • Check user scopes in order to perform this action (scope = confidant_person_relationship_request:write)

    • Return (403, 'Your scope does not allow to access this resource. Missing allowances: confidant_person_relationship_request:write') in case of invalid scope(s)

Validation

Validate Person

  • Get person_id from URL

  • Validate person status is active (status = ‘active' & is_active = 'true’)

    • in case of error - return 404 ('Person is not found')

Validate request

Service Logic

Generate verification code

Get template for OTP SMS from CONFIDANT_PERSON_RELATIONSHIP_SMS_TEMPLATE config parameter.

Invoke Initialize OTP to generate one time password and send it to confidant persons number that is stored in authentication_method_current.phone_number

Render a response

Render a response according to specification.

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