complete-register-alias.rst (1414B)
1 .. ts:op:: completeRegisterAlias 2 3 Complete an alias registration started with :ts:op:`registerAlias` 4 by answering the challenge that the taldir service sent to the 5 alias. 6 7 **Request:** 8 9 The request arguments are a `TaldirRegistrationCompletionRequest` 10 object. 11 12 **Response:** 13 14 On success, the result is an empty object. 15 16 **Side effects:** 17 18 Completes the pending alias registration at the taldir service by 19 submitting the challenge response over the network. 20 21 **Expected errors:** 22 23 The caller can handle the following errors inline: 24 ``WALLET_ALIAS_REGISTRATION_FAILED``, ``GENERIC_FORBIDDEN``. 25 26 **Details:** 27 28 Wallet-core derives the answer sent to the service as the hash of 29 the ``challenge`` together with the ``targetUri`` from the 30 registration request, which protects the user against authorizing 31 a concurrent registration of a different target URI. 32 ``GENERIC_FORBIDDEN`` indicates that the service rejected the 33 answer to the challenge. 34 35 .. ts:def:: TaldirRegistrationCompletionRequest 36 37 interface TaldirRegistrationCompletionRequest { 38 // Alias being registered. 39 alias: string; 40 41 // Type of the alias. 42 aliasType: string; 43 44 // Challenge received at the alias. 45 challenge: string; 46 47 // Base URL of the taldir service. 48 taldirBaseUrl: string; 49 50 // Target URI from the registration request. 51 targetUri: string; 52 }