|
| 1 | +<?php |
| 2 | +/** |
| 3 | + * Copyright © Magento, Inc. All rights reserved. |
| 4 | + * See COPYING.txt for license details. |
| 5 | + */ |
| 6 | + |
| 7 | +declare(strict_types=1); |
| 8 | + |
| 9 | +namespace Magento\TwoFactorAuth\Api\Data; |
| 10 | + |
| 11 | +use Magento\Framework\Api\ExtensibleDataInterface; |
| 12 | + |
| 13 | +/** |
| 14 | + * Represents the response to the new admin token response |
| 15 | + */ |
| 16 | +interface AdminTokenResponseInterface extends ExtensibleDataInterface |
| 17 | +{ |
| 18 | + /** |
| 19 | + * User id field |
| 20 | + */ |
| 21 | + const USER_ID = 'user_id'; |
| 22 | + |
| 23 | + /** |
| 24 | + * Message field |
| 25 | + */ |
| 26 | + const MESSAGE = 'message'; |
| 27 | + |
| 28 | + /** |
| 29 | + * Providers field |
| 30 | + */ |
| 31 | + const ACTIVE_PROVIDERS = 'active_providers'; |
| 32 | + |
| 33 | + /** |
| 34 | + * Get the id of the authenticated user |
| 35 | + * |
| 36 | + * @return string |
| 37 | + */ |
| 38 | + public function getUserId(): string; |
| 39 | + |
| 40 | + /** |
| 41 | + * Set the id of the authenticated user |
| 42 | + * |
| 43 | + * @param int $value |
| 44 | + * @return void |
| 45 | + */ |
| 46 | + public function setUserId(int $value): void; |
| 47 | + |
| 48 | + /** |
| 49 | + * Get the message from the response |
| 50 | + * |
| 51 | + * @return string |
| 52 | + */ |
| 53 | + public function getMessage(): string; |
| 54 | + |
| 55 | + /** |
| 56 | + * Set the id of the message |
| 57 | + * |
| 58 | + * @param string $value |
| 59 | + * @return void |
| 60 | + */ |
| 61 | + public function setMessage(string $value): void; |
| 62 | + |
| 63 | + /** |
| 64 | + * Get the providers |
| 65 | + * |
| 66 | + * @return \Magento\TwoFactorAuth\Api\ProviderInterface[] |
| 67 | + */ |
| 68 | + public function getActiveProviders(): array; |
| 69 | + |
| 70 | + /** |
| 71 | + * Set the providers |
| 72 | + * |
| 73 | + * @param \Magento\TwoFactorAuth\Api\ProviderInterface[] $value |
| 74 | + * @return void |
| 75 | + */ |
| 76 | + public function setActiveProviders(array $value): void; |
| 77 | + |
| 78 | + /** |
| 79 | + * Retrieve existing extension attributes object or create a new one |
| 80 | + * |
| 81 | + * Used fully qualified namespaces in annotations for proper work of extension interface/class code generation |
| 82 | + * |
| 83 | + * @return \Magento\TwoFactorAuth\Api\Data\AdminTokenResponseExtensionInterface|null |
| 84 | + */ |
| 85 | + public function getExtensionAttributes(): ?AdminTokenResponseExtensionInterface; |
| 86 | + |
| 87 | + /** |
| 88 | + * Set an extension attributes object |
| 89 | + * |
| 90 | + * @param \Magento\TwoFactorAuth\Api\Data\AdminTokenResponseExtensionInterface $extensionAttributes |
| 91 | + * @return void |
| 92 | + */ |
| 93 | + public function setExtensionAttributes( |
| 94 | + AdminTokenResponseExtensionInterface $extensionAttributes |
| 95 | + ): void; |
| 96 | +} |
0 commit comments